home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-12 | 17.4 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Wed Apr 12 01:32:35 1995, modified Wed Apr 12 01:32:35 1995, creator 'MMCC', type ASCII, 16718 bytes "VBLInstall.c" , at 0x41ce 852 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 56 42 4c 49 6e 73 | 74 61 6c 6c 2e 63 00 00 |..VBLIns|tall.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 41 4e 00 | 00 03 54 ab b1 16 73 ab |.....AN.|..T...s.|
|00000060| b1 16 73 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..s.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 01 57 00 00 |........|.....W..|
|00000080| 2f 2a 0d 56 42 4c 49 6e | 73 74 61 6c 6c 2e 63 0d |/*.VBLIn|stall.c.|
|00000090| 0d 54 68 69 73 20 69 73 | 20 74 68 65 20 41 70 70 |.This is| the App|
|000000a0| 6c 65 2d 72 65 63 6f 6d | 6d 65 6e 64 65 64 20 77 |le-recom|mended w|
|000000b0| 61 79 20 6f 66 20 73 79 | 6e 63 68 72 6f 6e 69 7a |ay of sy|nchroniz|
|000000c0| 69 6e 67 20 79 6f 75 72 | 20 70 72 6f 67 72 61 6d |ing your| program|
|000000d0| 20 74 6f 20 61 20 76 69 | 64 65 6f 0d 64 69 73 70 | to a vi|deo.disp|
|000000e0| 6c 61 79 2e 20 49 6e 20 | 74 68 65 20 4d 61 63 69 |lay. In |the Maci|
|000000f0| 6e 74 6f 73 68 2c 20 69 | 6e 74 65 72 72 75 70 74 |ntosh, i|nterrupt|
|00000100| 20 73 65 72 76 69 63 65 | 20 72 6f 75 74 69 6e 65 | service| routine|
|00000110| 73 20 72 75 6e 20 61 74 | 20 61 20 68 69 67 68 20 |s run at| a high |
|00000120| 70 72 6f 63 65 73 73 6f | 72 0d 70 72 69 6f 72 69 |processo|r.priori|
|00000130| 74 79 2c 20 69 2e 65 2e | 20 74 68 65 79 20 62 6c |ty, i.e.| they bl|
|00000140| 6f 63 6b 20 69 6e 74 65 | 72 72 75 70 74 73 20 77 |ock inte|rrupts w|
|00000150| 68 69 6c 65 20 74 68 65 | 79 20 72 75 6e 2c 20 73 |hile the|y run, s|
|00000160| 6f 20 41 70 70 6c 65 20 | 61 64 76 69 73 65 73 20 |o Apple |advises |
|00000170| 74 68 61 74 20 74 68 65 | 79 0d 62 65 20 76 65 72 |that the|y.be ver|
|00000180| 79 20 71 75 69 63 6b 2c | 20 74 6f 20 61 76 6f 69 |y quick,| to avoi|
|00000190| 64 20 6d 69 73 73 69 6e | 67 20 69 6e 74 65 72 72 |d missin|g interr|
|000001a0| 75 70 74 73 2e 20 54 68 | 61 74 20 69 73 20 74 68 |upts. Th|at is th|
|000001b0| 65 20 61 70 70 72 6f 61 | 63 68 20 74 61 6b 65 6e |e approa|ch taken|
|000001c0| 20 68 65 72 65 2c 0d 75 | 73 69 6e 67 20 74 68 65 | here,.u|sing the|
|000001d0| 20 69 6e 74 65 72 72 75 | 70 74 20 73 65 72 76 69 | interru|pt servi|
|000001e0| 63 65 20 72 6f 75 74 69 | 6e 65 73 20 73 6f 6c 65 |ce routi|nes sole|
|000001f0| 6c 79 20 74 6f 20 62 75 | 6d 70 20 61 20 66 72 61 |ly to bu|mp a fra|
|00000200| 6d 65 20 63 6f 75 6e 74 | 65 72 20 61 6e 64 20 73 |me count|er and s|
|00000210| 65 74 20 61 0d 6e 65 77 | 46 72 61 6d 65 20 66 6c |et a.new|Frame fl|
|00000220| 61 67 20 74 6f 20 74 72 | 75 65 2e 20 54 79 70 69 |ag to tr|ue. Typi|
|00000230| 63 61 6c 6c 79 20 79 6f | 75 72 20 6d 61 69 6e 20 |cally yo|ur main |
|00000240| 70 72 6f 67 72 61 6d 20 | 77 69 6c 6c 20 69 74 65 |program |will ite|
|00000250| 72 61 74 69 76 65 6c 79 | 20 74 65 73 74 20 74 68 |ratively| test th|
|00000260| 65 0d 6e 65 77 46 72 61 | 6d 65 20 66 6c 61 67 20 |e.newFra|me flag |
|00000270| 61 6e 64 2c 20 77 68 65 | 6e 20 69 74 27 73 20 74 |and, whe|n it's t|
|00000280| 72 75 65 2c 20 63 6c 65 | 61 72 20 69 74 20 61 6e |rue, cle|ar it an|
|00000290| 64 20 64 6f 20 73 6f 6d | 65 20 61 63 74 69 6f 6e |d do som|e action|
|000002a0| 20 74 68 61 74 20 79 6f | 75 20 77 61 6e 74 20 74 | that yo|u want t|
|000002b0| 6f 0d 64 6f 20 6f 6e 63 | 65 20 70 65 72 20 66 72 |o.do onc|e per fr|
|000002c0| 61 6d 65 2c 20 69 6e 20 | 73 79 6e 63 68 20 77 69 |ame, in |synch wi|
|000002d0| 74 68 20 74 68 65 20 76 | 69 64 65 6f 20 66 72 61 |th the v|ideo fra|
|000002e0| 6d 65 73 2e 0d 0d 4f 53 | 45 72 72 20 56 42 4c 49 |mes...OS|Err VBLI|
|000002f0| 6e 73 74 61 6c 6c 28 56 | 42 4c 54 61 73 6b 41 6e |nstall(V|BLTaskAn|
|00000300| 64 41 35 20 2a 76 62 6c | 44 61 74 61 2c 47 44 48 |dA5 *vbl|Data,GDH|
|00000310| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 2c 69 6e 74 |andle de|vice,int|
|00000320| 20 66 72 61 6d 65 73 29 | 3b 0d 0d 54 68 65 20 66 | frames)|;..The f|
|00000330| 69 72 73 74 20 61 72 67 | 75 6d 65 6e 74 20 69 73 |irst arg|ument is|
|00000340| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 61 20 | a point|er to a |
|00000350| 75 73 65 72 2d 73 75 70 | 70 6c 69 65 64 20 64 61 |user-sup|plied da|
|00000360| 74 61 20 73 74 72 75 63 | 74 75 72 65 2e 20 22 64 |ta struc|ture. "d|
|00000370| 65 76 69 63 65 22 20 69 | 73 20 61 0d 68 61 6e 64 |evice" i|s a.hand|
|00000380| 6c 65 20 74 6f 20 74 68 | 65 20 76 69 64 65 6f 20 |le to th|e video |
|00000390| 73 63 72 65 65 6e 20 74 | 68 61 74 20 79 6f 75 20 |screen t|hat you |
|000003a0| 77 61 6e 74 20 74 6f 20 | 73 79 6e 63 68 72 6f 6e |want to |synchron|
|000003b0| 69 7a 65 20 74 6f 2c 20 | 6f 72 20 4e 55 4c 4c 20 |ize to, |or NULL |
|000003c0| 69 66 20 79 6f 75 20 77 | 61 6e 74 0d 74 6f 20 73 |if you w|ant.to s|
|000003d0| 79 6e 63 68 72 6f 6e 69 | 7a 65 20 74 6f 20 74 68 |ynchroni|ze to th|
|000003e0| 65 20 53 79 73 74 65 6d | 20 56 42 4c 20 72 61 74 |e System| VBL rat|
|000003f0| 65 20 28 75 73 75 61 6c | 6c 79 20 36 30 2e 31 35 |e (usual|ly 60.15|
|00000400| 20 48 7a 29 2e 20 54 68 | 65 20 6c 61 73 74 20 61 | Hz). Th|e last a|
|00000410| 72 67 75 6d 65 6e 74 2c | 0d 22 66 72 61 6d 65 73 |rgument,|."frames|
|00000420| 22 2c 20 73 70 65 63 69 | 66 69 65 73 20 68 6f 77 |", speci|fies how|
|00000430| 20 6d 61 6e 79 20 74 69 | 6d 65 73 20 79 6f 75 20 | many ti|mes you |
|00000440| 77 61 6e 74 20 74 68 65 | 20 69 6e 74 65 72 72 75 |want the| interru|
|00000450| 70 74 20 74 6f 20 6f 63 | 63 75 72 20 62 65 66 6f |pt to oc|cur befo|
|00000460| 72 65 20 74 68 65 0d 72 | 6f 75 74 69 6e 65 20 64 |re the.r|outine d|
|00000470| 69 73 61 62 6c 65 73 20 | 69 74 73 65 6c 66 2e 20 |isables |itself. |
|00000480| 49 66 20 66 72 61 6d 65 | 73 3c 30 20 74 68 65 6e |If frame|s<0 then|
|00000490| 20 74 68 65 20 69 6e 74 | 65 72 72 75 70 74 20 77 | the int|errupt w|
|000004a0| 69 6c 6c 20 72 65 63 75 | 72 20 69 6e 64 65 66 69 |ill recu|r indefi|
|000004b0| 6e 69 74 65 6c 79 2e 0d | 0d 56 42 4c 49 6e 73 74 |nitely..|.VBLInst|
|000004c0| 61 6c 6c 20 7a 65 72 6f | 65 73 20 76 62 6c 44 61 |all zero|es vblDa|
|000004d0| 74 61 2d 3e 66 72 61 6d | 65 2c 20 61 6e 64 20 73 |ta->fram|e, and s|
|000004e0| 65 74 73 20 76 62 6c 44 | 61 74 61 2d 3e 66 72 61 |ets vblD|ata->fra|
|000004f0| 6d 65 73 44 65 73 69 72 | 65 64 20 61 6e 64 20 76 |mesDesir|ed and v|
|00000500| 62 6c 44 61 74 61 2d 3e | 66 72 61 6d 65 73 4c 65 |blData->|framesLe|
|00000510| 66 74 20 65 71 75 61 6c | 20 74 6f 0d 22 66 72 61 |ft equal| to."fra|
|00000520| 6d 65 73 22 2e 20 57 68 | 69 6c 65 20 76 62 6c 44 |mes". Wh|ile vblD|
|00000530| 61 74 61 2d 3e 66 72 61 | 6d 65 73 4c 65 66 74 21 |ata->fra|mesLeft!|
|00000540| 3d 30 2c 20 61 74 20 65 | 61 63 68 20 65 6e 64 2d |=0, at e|ach end-|
|00000550| 6f 66 2d 66 72 61 6d 65 | 20 69 6e 74 65 72 72 75 |of-frame| interru|
|00000560| 70 74 0d 76 62 6c 44 61 | 74 61 2d 3e 66 72 61 6d |pt.vblDa|ta->fram|
|00000570| 65 20 77 69 6c 6c 20 62 | 65 20 69 6e 63 72 65 6d |e will b|e increm|
|00000580| 65 6e 74 65 64 20 61 6e | 64 20 76 62 6c 44 61 74 |ented an|d vblDat|
|00000590| 61 2d 3e 6e 65 77 46 72 | 61 6d 65 20 77 69 6c 6c |a->newFr|ame will|
|000005a0| 20 62 65 20 73 65 74 20 | 74 6f 20 31 2e 20 0d 76 | be set |to 1. .v|
|000005b0| 62 6c 44 61 74 61 2d 3e | 66 72 61 6d 65 73 4c 65 |blData->|framesLe|
|000005c0| 66 74 20 77 69 6c 6c 20 | 62 65 20 64 65 63 72 65 |ft will |be decre|
|000005d0| 6d 65 6e 74 65 64 20 69 | 66 0d 69 74 27 73 20 3e |mented i|f.it's >|
|000005e0| 30 2c 20 62 75 74 20 6c | 65 66 74 20 61 6c 6f 6e |0, but l|eft alon|
|000005f0| 65 20 69 66 20 69 74 27 | 73 20 6e 65 67 61 74 69 |e if it'|s negati|
|00000600| 76 65 2e 20 49 66 20 76 | 62 6c 44 61 74 61 2d 3e |ve. If v|blData->|
|00000610| 66 72 61 6d 65 73 4c 65 | 66 74 20 69 73 20 64 65 |framesLe|ft is de|
|00000620| 63 72 65 6d 65 6e 74 65 | 64 0d 74 6f 20 7a 65 72 |cremente|d.to zer|
|00000630| 6f 20 74 68 65 6e 20 74 | 68 65 20 69 6e 74 65 72 |o then t|he inter|
|00000640| 72 75 70 74 20 73 65 72 | 76 69 63 65 20 72 6f 75 |rupt ser|vice rou|
|00000650| 74 69 6e 65 20 69 73 20 | 64 6f 6e 65 2c 20 61 6e |tine is |done, an|
|00000660| 64 20 77 6f 6e 27 74 20 | 72 65 65 6e 61 62 6c 65 |d won't |reenable|
|00000670| 20 74 68 65 0d 69 6e 74 | 65 72 72 75 70 74 2e 0d | the.int|errupt..|
|00000680| 0d 48 65 72 65 27 73 20 | 61 20 6d 69 6e 69 6d 61 |.Here's |a minima|
|00000690| 6c 20 70 72 6f 67 72 61 | 6d 2c 20 65 78 74 72 61 |l progra|m, extra|
|000006a0| 63 74 65 64 20 66 72 6f | 6d 20 4e 6f 69 73 65 56 |cted fro|m NoiseV|
|000006b0| 42 4c 2e 63 2c 20 74 68 | 61 74 20 75 73 65 73 20 |BL.c, th|at uses |
|000006c0| 74 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 20 74 |these ro|utines t|
|000006d0| 6f 0d 73 68 6f 77 20 61 | 20 31 30 30 2d 66 72 61 |o.show a| 100-fra|
|000006e0| 6d 65 20 6d 6f 76 69 65 | 2c 20 77 69 74 68 20 61 |me movie|, with a|
|000006f0| 20 6e 65 77 20 69 6d 61 | 67 65 20 6f 6e 20 65 61 | new ima|ge on ea|
|00000700| 63 68 20 76 69 64 65 6f | 20 66 72 61 6d 65 3a 0d |ch video| frame:.|
|00000710| 0d 09 56 42 4c 54 61 73 | 6b 41 6e 64 41 35 20 6e |..VBLTas|kAndA5 n|
|00000720| 6f 69 73 65 56 42 4c 3b | 0d 09 47 44 48 61 6e 64 |oiseVBL;|..GDHand|
|00000730| 6c 65 20 64 65 76 69 63 | 65 3d 47 65 74 4d 61 69 |le devic|e=GetMai|
|00000740| 6e 44 65 76 69 63 65 28 | 29 3b 0d 09 69 6e 74 20 |nDevice(|);..int |
|00000750| 66 72 61 6d 65 73 3d 31 | 30 30 2c 65 72 72 6f 72 |frames=1|00,error|
|00000760| 3b 0d 0d 09 6e 6f 69 73 | 65 56 42 4c 2e 73 75 62 |;...nois|eVBL.sub|
|00000770| 72 6f 75 74 69 6e 65 3d | 4e 55 4c 4c 3b 09 09 09 |routine=|NULL;...|
|00000780| 09 2f 2f 20 72 65 71 75 | 65 73 74 20 64 65 66 61 |.// requ|est defa|
|00000790| 75 6c 74 20 73 75 62 72 | 6f 75 74 69 6e 65 0d 09 |ult subr|outine..|
|000007a0| 65 72 72 6f 72 3d 56 42 | 4c 49 6e 73 74 61 6c 6c |error=VB|LInstall|
|000007b0| 28 26 6e 6f 69 73 65 56 | 42 4c 2c 64 65 76 69 63 |(&noiseV|BL,devic|
|000007c0| 65 2c 66 72 61 6d 65 73 | 29 3b 0d 09 69 66 28 65 |e,frames|);..if(e|
|000007d0| 72 72 6f 72 29 50 72 69 | 6e 74 66 45 78 69 74 28 |rror)Pri|ntfExit(|
|000007e0| 22 56 42 4c 49 6e 73 74 | 61 6c 6c 20 65 72 72 6f |"VBLInst|all erro|
|000007f0| 72 20 25 64 5c 6e 22 2c | 65 72 72 6f 72 29 3b 0d |r %d\n",|error);.|
|00000800| 09 6e 6f 69 73 65 56 42 | 4c 2e 76 62 6c 2e 76 62 |.noiseVB|L.vbl.vb|
|00000810| 6c 43 6f 75 6e 74 3d 31 | 3b 09 2f 2f 20 65 6e 61 |lCount=1|;.// ena|
|00000820| 62 6c 65 20 74 68 65 20 | 69 6e 74 65 72 72 75 70 |ble the |interrup|
|00000830| 74 20 73 65 72 76 69 63 | 65 20 72 6f 75 74 69 6e |t servic|e routin|
|00000840| 65 0d 09 77 68 69 6c 65 | 28 6e 6f 69 73 65 56 42 |e..while|(noiseVB|
|00000850| 4c 2e 66 72 61 6d 65 73 | 4c 65 66 74 29 7b 0d 09 |L.frames|Left){..|
|00000860| 09 69 66 28 6e 6f 69 73 | 65 56 42 4c 2e 6e 65 77 |.if(nois|eVBL.new|
|00000870| 46 72 61 6d 65 29 7b 0d | 09 09 09 6e 6f 69 73 65 |Frame){.|...noise|
|00000880| 56 42 4c 2e 6e 65 77 46 | 72 61 6d 65 3d 30 3b 0d |VBL.newF|rame=0;.|
|00000890| 09 09 09 43 6f 70 79 42 | 69 74 73 51 75 69 63 6b |...CopyB|itsQuick|
|000008a0| 6c 79 28 28 42 69 74 4d | 61 70 20 2a 29 26 28 6d |ly((BitM|ap *)&(m|
|000008b0| 6f 76 69 65 5b 6e 6f 69 | 73 65 56 42 4c 2e 66 72 |ovie[noi|seVBL.fr|
|000008c0| 61 6d 65 5d 29 0d 09 09 | 09 09 2c 28 42 69 74 4d |ame])...|..,(BitM|
|000008d0| 61 70 20 2a 29 2a 28 28 | 43 47 72 61 66 50 74 72 |ap *)*((|CGrafPtr|
|000008e0| 29 77 69 6e 64 6f 77 29 | 2d 3e 70 6f 72 74 50 69 |)window)|->portPi|
|000008f0| 78 4d 61 70 0d 09 09 09 | 09 2c 26 6e 6f 69 73 65 |xMap....|.,&noise|
|00000900| 49 6d 61 67 65 5b 30 5d | 2e 62 6f 75 6e 64 73 2c |Image[0]|.bounds,|
|00000910| 26 77 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |&window-|>portRec|
|00000920| 74 2c 73 72 63 43 6f 70 | 79 2c 4e 55 4c 4c 29 3b |t,srcCop|y,NULL);|
|00000930| 0d 09 09 7d 0d 09 7d 0d | 09 56 42 4c 52 65 6d 6f |...}..}.|.VBLRemo|
|00000940| 76 65 28 26 6e 6f 69 73 | 65 56 42 4c 29 3b 0d 0d |ve(&nois|eVBL);..|
|00000950| 41 70 70 6c 65 20 77 61 | 72 6e 73 20 74 68 61 74 |Apple wa|rns that|
|00000960| 20 69 6e 74 65 72 72 75 | 70 74 20 73 65 72 76 69 | interru|pt servi|
|00000970| 63 65 20 72 6f 75 74 69 | 6e 65 73 20 61 6e 64 20 |ce routi|nes and |
|00000980| 61 6e 79 20 64 61 74 61 | 20 74 68 61 74 20 74 68 |any data| that th|
|00000990| 65 79 20 61 63 63 65 73 | 73 20 6d 75 73 74 0d 62 |ey acces|s must.b|
|000009a0| 65 20 6c 6f 63 6b 65 64 | 20 69 6e 74 6f 20 6d 65 |e locked| into me|
|000009b0| 6d 6f 72 79 2c 20 6e 6f | 74 20 73 77 61 70 70 65 |mory, no|t swappe|
|000009c0| 64 20 6f 75 74 2c 20 65 | 2e 67 2e 20 64 75 65 20 |d out, e|.g. due |
|000009d0| 74 6f 20 6f 70 65 72 61 | 74 69 6f 6e 20 6f 66 20 |to opera|tion of |
|000009e0| 74 68 65 20 4d 65 6d 6f | 72 79 0d 4d 61 6e 61 67 |the Memo|ry.Manag|
|000009f0| 65 72 20 6f 72 20 56 69 | 72 74 75 61 6c 20 4d 65 |er or Vi|rtual Me|
|00000a00| 6d 6f 72 79 2e 20 49 74 | 20 69 73 20 64 61 6e 67 |mory. It| is dang|
|00000a10| 65 72 6f 75 73 20 74 6f | 20 61 6c 6c 6f 77 20 79 |erous to| allow y|
|00000a20| 6f 75 72 20 63 6f 6d 70 | 69 6c 65 72 20 74 6f 20 |our comp|iler to |
|00000a30| 69 6e 73 74 61 6c 6c 0d | 64 65 62 75 67 67 69 6e |install.|debuggin|
|00000a40| 67 20 63 6f 64 65 20 69 | 6e 74 6f 20 69 6e 74 65 |g code i|nto inte|
|00000a50| 72 72 75 70 74 20 73 65 | 72 76 69 63 65 20 72 6f |rrupt se|rvice ro|
|00000a60| 75 74 69 6e 65 73 2e 20 | 49 74 20 69 73 20 56 45 |utines. |It is VE|
|00000a70| 52 59 20 69 6d 70 6f 72 | 74 61 6e 74 20 74 68 61 |RY impor|tant tha|
|00000a80| 74 20 79 6f 75 0d 63 61 | 6c 6c 20 56 42 4c 52 65 |t you.ca|ll VBLRe|
|00000a90| 6d 6f 76 65 28 29 20 62 | 65 66 6f 72 65 20 71 75 |move() b|efore qu|
|00000aa0| 69 74 74 69 6e 67 2e 20 | 4f 6e 63 65 20 69 6e 73 |itting. |Once ins|
|00000ab0| 74 61 6c 6c 65 64 2c 20 | 73 6c 6f 74 2d 62 61 73 |talled, |slot-bas|
|00000ac0| 65 64 20 69 6e 74 65 72 | 72 75 70 74 20 74 61 73 |ed inter|rupt tas|
|00000ad0| 6b 73 0d 6b 65 65 70 20 | 67 6f 69 6e 67 20 66 6f |ks.keep |going fo|
|00000ae0| 72 65 76 65 72 2e 20 28 | 54 75 72 6e 69 6e 67 20 |rever. (|Turning |
|00000af0| 6f 66 66 20 76 62 6c 44 | 61 74 61 2d 3e 76 62 6c |off vblD|ata->vbl|
|00000b00| 2e 76 62 6c 43 6f 75 6e | 74 20 64 69 73 61 62 6c |.vblCoun|t disabl|
|00000b10| 65 73 20 74 68 65 20 72 | 6f 75 74 69 6e 65 2c 20 |es the r|outine, |
|00000b20| 62 75 74 0d 64 6f 65 73 | 6e 27 74 20 72 65 6d 6f |but.does|n't remo|
|00000b30| 76 65 20 69 74 2e 29 20 | 54 68 65 20 74 61 73 6b |ve it.) |The task|
|00000b40| 73 20 61 72 65 20 6e 6f | 74 20 72 65 6d 6f 76 65 |s are no|t remove|
|00000b50| 64 20 62 79 20 74 68 65 | 20 46 69 6e 64 65 72 20 |d by the| Finder |
|00000b60| 6f 72 20 53 79 73 74 65 | 6d 20 77 68 65 6e 20 79 |or Syste|m when y|
|00000b70| 6f 75 72 0d 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our.appl|ication |
|00000b80| 66 69 6e 69 73 68 65 73 | 2c 20 65 76 65 6e 20 74 |finishes|, even t|
|00000b90| 68 6f 75 67 68 20 74 68 | 65 20 69 6e 74 65 72 72 |hough th|e interr|
|00000ba0| 75 70 74 20 73 65 72 76 | 69 63 65 20 72 6f 75 74 |upt serv|ice rout|
|00000bb0| 69 6e 65 27 73 20 63 6f | 64 65 20 61 6e 64 20 64 |ine's co|de and d|
|00000bc0| 61 74 61 0d 77 69 6c 6c | 20 70 72 6f 62 61 62 6c |ata.will| probabl|
|00000bd0| 79 20 62 65 20 6f 76 65 | 72 77 72 69 74 74 65 6e |y be ove|rwritten|
|00000be0| 2e 0d 0d 41 63 74 75 61 | 6c 6c 79 2c 20 74 68 69 |...Actua|lly, thi|
|00000bf0| 6e 67 73 20 61 72 65 6e | 27 74 20 74 68 61 74 20 |ngs aren|'t that |
|00000c00| 62 61 64 2c 20 62 65 63 | 61 75 73 65 20 49 27 76 |bad, bec|ause I'v|
|00000c10| 65 20 61 64 64 65 64 20 | 61 20 63 61 6c 6c 20 74 |e added |a call t|
|00000c20| 6f 20 5f 61 74 65 78 69 | 74 28 29 0d 72 65 71 75 |o _atexi|t().requ|
|00000c30| 65 73 74 69 6e 67 20 74 | 68 61 74 20 61 6c 6c 20 |esting t|hat all |
|00000c40| 74 68 65 20 56 42 4c 20 | 74 61 73 6b 73 20 69 6e |the VBL |tasks in|
|00000c50| 73 74 61 6c 6c 65 64 20 | 62 79 20 56 42 4c 49 6e |stalled |by VBLIn|
|00000c60| 73 74 61 6c 6c 28 29 20 | 62 65 20 72 65 6d 6f 76 |stall() |be remov|
|00000c70| 65 64 20 77 68 65 6e 65 | 76 65 72 0d 74 68 65 20 |ed whene|ver.the |
|00000c80| 70 72 6f 67 72 61 6d 20 | 74 65 72 6d 69 6e 61 74 |program |terminat|
|00000c90| 65 73 2c 20 77 68 65 74 | 68 65 72 20 6e 6f 72 6d |es, whet|her norm|
|00000ca0| 61 6c 6c 79 20 6f 72 20 | 61 62 6e 6f 72 6d 61 6c |ally or |abnormal|
|00000cb0| 6c 79 2e 20 54 68 69 73 | 20 70 72 65 76 65 6e 74 |ly. This| prevent|
|00000cc0| 73 20 74 68 65 0d 6f 74 | 68 65 72 77 69 73 65 20 |s the.ot|herwise |
|00000cd0| 76 65 72 79 20 61 6e 6e | 6f 79 69 6e 67 20 63 72 |very ann|oying cr|
|00000ce0| 61 73 68 20 74 68 61 74 | 20 77 6f 75 6c 64 20 61 |ash that| would a|
|00000cf0| 63 63 6f 6d 70 61 6e 79 | 20 70 72 65 6d 61 74 75 |ccompany| prematu|
|00000d00| 72 65 20 74 65 72 6d 69 | 6e 61 74 69 6f 6e 2c 20 |re termi|nation, |
|00000d10| 65 2e 67 2e 0d 62 79 20 | 74 79 70 69 6e 67 20 63 |e.g..by |typing c|
|00000d20| 6f 6d 6d 61 6e 64 2d 2e | 2c 20 77 68 69 6c 65 20 |ommand-.|, while |
|00000d30| 74 68 65 20 56 42 4c 20 | 74 61 73 6b 20 69 73 20 |the VBL |task is |
|00000d40| 61 63 74 69 76 65 2e 0d | 0d 57 72 69 74 69 6e 67 |active..|.Writing|
|00000d50| 20 61 6e 20 69 6e 74 65 | 72 72 75 70 74 20 73 65 | an inte|rrupt se|
|00000d60| 72 76 69 63 65 20 72 6f | 75 74 69 6e 65 2c 20 74 |rvice ro|utine, t|
|00000d70| 6f 20 62 65 20 63 61 6c | 6c 65 64 20 6f 6e 63 65 |o be cal|led once|
|00000d80| 20 70 65 72 20 76 69 64 | 65 6f 20 66 72 61 6d 65 | per vid|eo frame|
|00000d90| 2c 20 69 73 0d 73 6c 69 | 67 68 74 6c 79 20 74 72 |, is.sli|ghtly tr|
|00000da0| 69 63 6b 79 2e 20 56 42 | 4c 49 6e 74 65 72 72 75 |icky. VB|LInterru|
|00000db0| 70 74 53 65 72 76 69 63 | 65 52 6f 75 74 69 6e 65 |ptServic|eRoutine|
|00000dc0| 20 64 6f 65 73 20 61 6c | 6c 20 74 68 65 20 64 69 | does al|l the di|
|00000dd0| 72 74 79 20 77 6f 72 6b | 2c 20 61 6e 64 20 74 68 |rty work|, and th|
|00000de0| 65 6e 0d 63 61 6c 6c 73 | 20 61 20 75 73 65 72 2d |en.calls| a user-|
|00000df0| 73 75 70 70 6c 69 65 64 | 20 73 75 62 72 6f 75 74 |supplied| subrout|
|00000e00| 69 6e 65 20 74 68 61 74 | 20 64 6f 65 73 20 77 68 |ine that| does wh|
|00000e10| 61 74 65 76 65 72 20 79 | 6f 75 20 77 61 6e 74 2e |atever y|ou want.|
|00000e20| 20 49 66 20 61 6c 6c 20 | 79 6f 75 20 77 61 6e 74 | If all |you want|
|00000e30| 20 74 6f 0d 64 6f 20 69 | 73 20 61 64 76 61 6e 63 | to.do i|s advanc|
|00000e40| 65 20 61 20 66 72 61 6d | 65 20 63 6f 75 6e 74 65 |e a fram|e counte|
|00000e50| 72 20 75 6e 74 69 6c 20 | 79 6f 75 20 72 65 61 63 |r until |you reac|
|00000e60| 68 20 74 68 65 20 64 65 | 73 69 72 65 64 20 6e 75 |h the de|sired nu|
|00000e70| 6d 62 65 72 20 6f 66 20 | 66 72 61 6d 65 73 20 74 |mber of |frames t|
|00000e80| 68 65 6e 0d 79 6f 75 20 | 6d 61 79 20 77 69 73 68 |hen.you |may wish|
|00000e90| 20 74 6f 20 75 73 65 20 | 74 68 65 20 64 65 66 61 | to use |the defa|
|00000ea0| 75 6c 74 20 46 72 61 6d | 65 53 75 62 72 6f 75 74 |ult Fram|eSubrout|
|00000eb0| 69 6e 65 28 29 20 69 6e | 73 74 65 61 64 20 6f 66 |ine() in|stead of|
|00000ec0| 20 77 72 69 74 69 6e 67 | 20 79 6f 75 72 20 6f 77 | writing| your ow|
|00000ed0| 6e 2e 0d 50 75 74 20 74 | 68 65 20 61 64 64 72 65 |n..Put t|he addre|
|00000ee0| 73 73 20 6f 66 20 77 68 | 61 74 65 76 65 72 20 72 |ss of wh|atever r|
|00000ef0| 6f 75 74 69 6e 65 20 79 | 6f 75 20 77 61 6e 74 20 |outine y|ou want |
|00000f00| 74 6f 20 75 73 65 20 69 | 6e 74 6f 20 74 68 65 20 |to use i|nto the |
|00000f10| 22 73 75 62 72 6f 75 74 | 69 6e 65 22 0d 65 6c 65 |"subrout|ine".ele|
|00000f20| 6d 65 6e 74 20 6f 66 20 | 74 68 65 20 56 42 4c 54 |ment of |the VBLT|
|00000f30| 61 73 6b 41 6e 64 41 35 | 20 73 74 72 75 63 74 75 |askAndA5| structu|
|00000f40| 72 65 2c 20 6f 72 2c 20 | 74 6f 20 72 65 71 75 65 |re, or, |to reque|
|00000f50| 73 74 20 75 73 65 20 6f | 66 20 46 72 61 6d 65 53 |st use o|f FrameS|
|00000f60| 75 62 72 6f 75 74 69 6e | 65 2c 0d 73 75 70 70 6c |ubroutin|e,.suppl|
|00000f70| 79 20 74 68 65 20 61 64 | 64 72 65 73 73 20 4e 55 |y the ad|dress NU|
|00000f80| 4c 4c 2e 20 48 6f 77 65 | 76 65 72 2c 20 69 66 20 |LL. Howe|ver, if |
|00000f90| 79 6f 75 72 20 63 6f 6d | 70 69 6c 65 72 20 75 73 |your com|piler us|
|00000fa0| 65 73 20 55 6e 69 76 65 | 72 73 61 6c 20 48 65 61 |es Unive|rsal Hea|
|00000fb0| 64 65 72 73 2c 20 74 68 | 65 6e 20 79 6f 75 20 0d |ders, th|en you .|
|00000fc0| 6d 75 73 74 20 73 75 70 | 70 6c 79 20 61 20 55 6e |must sup|ply a Un|
|00000fd0| 69 76 65 72 73 61 6c 20 | 50 72 6f 63 65 64 75 72 |iversal |Procedur|
|00000fe0| 65 20 50 6f 69 6e 74 65 | 72 20 69 6e 73 74 65 61 |e Pointe|r instea|
|00000ff0| 64 20 6f 66 20 74 68 65 | 20 73 75 62 72 6f 75 74 |d of the| subrout|
|00001000| 69 6e 65 20 61 64 64 72 | 65 73 73 3a 0d 0d 23 69 |ine addr|ess:..#i|
|00001010| 66 20 47 45 4e 45 52 41 | 54 49 4e 47 43 46 4d 0d |f GENERA|TINGCFM.|
|00001020| 09 6e 6f 69 73 65 56 42 | 4c 2e 73 75 62 72 6f 75 |.noiseVB|L.subrou|
|00001030| 74 69 6e 65 3d 4e 65 77 | 56 42 4c 50 72 6f 63 28 |tine=New|VBLProc(|
|00001040| 6d 79 52 6f 75 74 69 6e | 65 29 3b 0d 23 65 6c 73 |myRoutin|e);.#els|
|00001050| 65 0d 09 6e 6f 69 73 65 | 56 42 4c 2e 73 75 62 72 |e..noise|VBL.subr|
|00001060| 6f 75 74 69 6e 65 3d 6d | 79 52 6f 75 74 69 6e 65 |outine=m|yRoutine|
|00001070| 3b 0d 23 65 6e 64 69 66 | 0d 0d 46 72 61 6d 65 53 |;.#endif|..FrameS|
|00001080| 75 62 72 6f 75 74 69 6e | 65 28 29 20 75 73 65 73 |ubroutin|e() uses|
|00001090| 20 54 69 6d 65 72 2e 63 | 2e 20 49 66 20 74 68 69 | Timer.c|. If thi|
|000010a0| 73 20 70 72 6f 67 72 61 | 6d 20 72 75 6e 73 20 6f |s progra|m runs o|
|000010b0| 6e 20 61 6e 20 6f 6c 64 | 20 53 79 73 74 65 6d 20 |n an old| System |
|000010c0| 28 70 72 65 0d 36 2e 30 | 35 3f 29 20 6c 61 63 6b |(pre.6.0|5?) lack|
|000010d0| 69 6e 67 20 74 68 65 20 | 52 65 76 69 73 65 64 20 |ing the |Revised |
|000010e0| 54 69 6d 65 20 4d 61 6e | 61 67 65 72 2c 20 77 68 |Time Man|ager, wh|
|000010f0| 69 63 68 20 54 69 6d 65 | 72 2e 63 20 72 65 71 75 |ich Time|r.c requ|
|00001100| 69 72 65 73 2c 20 74 68 | 65 6e 0d 53 69 6d 70 6c |ires, th|en.Simpl|
|00001110| 65 56 42 4c 53 75 62 72 | 6f 75 74 69 6e 65 28 29 |eVBLSubr|outine()|
|00001120| 20 77 69 6c 6c 20 62 65 | 20 75 73 65 64 20 69 6e | will be| used in|
|00001130| 73 74 65 61 64 2e 20 54 | 68 65 20 54 69 6d 65 72 |stead. T|he Timer|
|00001140| 20 69 73 20 75 73 65 64 | 20 74 6f 20 64 69 73 63 | is used| to disc|
|00001150| 61 72 64 0d 73 70 75 72 | 69 6f 75 73 20 69 6e 74 |ard.spur|ious int|
|00001160| 65 72 72 75 70 74 73 20 | 74 68 61 74 20 6f 63 63 |errupts |that occ|
|00001170| 75 72 20 77 69 74 68 69 | 6e 20 35 20 6d 73 20 6f |ur withi|n 5 ms o|
|00001180| 66 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 2e 20 |f the pr|evious. |
|00001190| 54 68 69 73 20 69 73 20 | 6e 65 63 65 73 73 61 72 |This is |necessar|
|000011a0| 79 0d 62 65 63 61 75 73 | 65 20 73 6f 6d 65 20 6f |y.becaus|e some o|
|000011b0| 66 20 74 68 65 20 41 70 | 70 6c 65 20 76 69 64 65 |f the Ap|ple vide|
|000011c0| 6f 20 63 61 72 64 73 20 | 67 65 6e 65 72 61 74 65 |o cards |generate|
|000011d0| 20 73 65 76 65 72 61 6c | 20 69 6e 74 65 72 72 75 | several| interru|
|000011e0| 70 74 73 20 64 75 72 69 | 6e 67 20 74 68 65 0d 76 |pts duri|ng the.v|
|000011f0| 65 72 74 69 63 61 6c 20 | 62 6c 61 6e 6b 69 6e 67 |ertical |blanking|
|00001200| 20 69 6e 74 65 72 76 61 | 6c 2c 20 65 76 65 6e 20 | interva|l, even |
|00001210| 74 68 6f 75 67 68 20 41 | 70 70 6c 65 27 73 20 64 |though A|pple's d|
|00001220| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 63 6c 65 |ocumenta|tion cle|
|00001230| 61 72 6c 79 20 69 6e 64 | 69 63 61 74 65 73 0d 74 |arly ind|icates.t|
|00001240| 68 61 74 20 74 68 65 79 | 20 73 68 6f 75 6c 64 20 |hat they| should |
|00001250| 6f 6e 6c 79 20 67 65 6e | 65 72 61 74 65 20 6f 6e |only gen|erate on|
|00001260| 65 2e 20 54 68 65 20 66 | 69 78 20 28 68 6f 6c 64 |e. The f|ix (hold|
|00001270| 69 6e 67 20 6f 66 66 20 | 66 6f 72 20 35 20 6d 73 |ing off |for 5 ms|
|00001280| 29 20 77 61 73 20 73 75 | 67 67 65 73 74 65 64 0d |) was su|ggested.|
|00001290| 62 79 20 52 61 79 6e 61 | 6c 64 20 43 6f 6d 74 6f |by Rayna|ld Comto|
|000012a0| 69 73 2e 0d 0d 54 68 65 | 20 31 39 39 32 20 41 70 |is...The| 1992 Ap|
|000012b0| 70 6c 65 20 22 49 6e 73 | 69 64 65 20 4d 61 63 69 |ple "Ins|ide Maci|
|000012c0| 6e 74 6f 73 68 3a 20 50 | 72 6f 63 65 73 73 65 73 |ntosh: P|rocesses|
|000012d0| 22 20 62 6f 6f 6b 20 65 | 78 70 6c 61 69 6e 73 20 |" book e|xplains |
|000012e0| 68 6f 77 20 74 6f 20 63 | 6f 64 65 20 61 20 74 61 |how to c|ode a ta|
|000012f0| 73 6b 0d 74 68 61 74 20 | 69 73 20 74 6f 20 62 65 |sk.that |is to be|
|00001300| 20 70 65 72 66 6f 72 6d | 65 64 20 65 61 63 68 20 | perform|ed each |
|00001310| 74 69 6d 65 20 79 6f 75 | 72 20 76 69 64 65 6f 20 |time you|r video |
|00001320| 64 65 76 69 63 65 20 70 | 72 6f 64 75 63 65 73 20 |device p|roduces |
|00001330| 61 20 76 65 72 74 69 63 | 61 6c 20 62 6c 61 6e 6b |a vertic|al blank|
|00001340| 69 6e 67 0d 6c 65 76 65 | 6c 20 28 69 2e 65 2e 20 |ing.leve|l (i.e. |
|00001350| 62 65 74 77 65 65 6e 20 | 76 69 64 65 6f 20 66 72 |between |video fr|
|00001360| 61 6d 65 73 29 2e 20 49 | 74 27 73 20 71 75 69 74 |ames). I|t's quit|
|00001370| 65 20 74 72 69 63 6b 79 | 2e 20 54 68 65 72 65 66 |e tricky|. Theref|
|00001380| 6f 72 65 20 49 20 77 72 | 6f 74 65 20 61 0d 67 65 |ore I wr|ote a.ge|
|00001390| 6e 65 72 69 63 20 6f 6e | 65 2c 20 74 68 61 74 20 |neric on|e, that |
|000013a0| 69 6e 20 74 75 72 6e 2c | 20 63 61 6c 6c 73 20 79 |in turn,| calls y|
|000013b0| 6f 75 72 20 63 75 73 74 | 6f 6d 20 6f 6e 65 2c 20 |our cust|om one, |
|000013c0| 61 66 74 65 72 20 61 6c | 6c 20 74 68 65 20 74 72 |after al|l the tr|
|000013d0| 69 63 6b 79 20 62 69 74 | 73 20 68 61 76 65 0d 62 |icky bit|s have.b|
|000013e0| 65 65 6e 20 74 61 6b 65 | 6e 20 63 61 72 65 20 6f |een take|n care o|
|000013f0| 66 2e 0d 0d 54 68 65 72 | 65 20 61 72 65 20 73 6f |f...Ther|e are so|
|00001400| 6d 65 20 73 75 62 74 6c | 65 74 69 65 73 20 74 6f |me subtl|eties to|
|00001410| 20 74 68 65 20 56 42 4c | 20 69 6e 74 65 72 72 75 | the VBL| interru|
|00001420| 70 74 20 73 65 72 76 69 | 63 65 20 72 6f 75 74 69 |pt servi|ce routi|
|00001430| 6e 65 2e 20 54 68 65 20 | 6d 61 69 6e 20 6f 6e 65 |ne. The |main one|
|00001440| 20 69 73 0d 74 68 61 74 | 20 61 6c 6c 20 74 68 65 | is.that| all the|
|00001450| 20 4d 61 63 69 6e 74 6f | 73 68 20 63 6f 6d 70 69 | Macinto|sh compi|
|00001460| 6c 65 72 73 20 72 65 66 | 65 72 65 6e 63 65 20 67 |lers ref|erence g|
|00001470| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 73 20 |lobal va|riables |
|00001480| 72 65 6c 61 74 69 76 65 | 20 74 6f 20 72 65 67 69 |relative| to regi|
|00001490| 73 74 65 72 0d 41 35 2c | 20 62 75 74 20 72 65 67 |ster.A5,| but reg|
|000014a0| 69 73 74 65 72 20 41 35 | 20 6d 61 79 20 68 61 76 |ister A5| may hav|
|000014b0| 65 20 74 68 65 20 77 72 | 6f 6e 67 20 76 61 6c 75 |e the wr|ong valu|
|000014c0| 65 20 28 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 |e (corre|sponding|
|000014d0| 20 74 6f 20 61 20 64 69 | 66 66 65 72 65 6e 74 0d | to a di|fferent.|
|000014e0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 29 20 61 74 20 |applicat|ion) at |
|000014f0| 69 6e 74 65 72 72 75 70 | 74 20 74 69 6d 65 2e 20 |interrup|t time. |
|00001500| 53 6f 20 77 65 20 73 61 | 76 65 20 74 68 65 20 72 |So we sa|ve the r|
|00001510| 69 67 68 74 20 76 61 6c | 75 65 20 6f 66 20 41 35 |ight val|ue of A5|
|00001520| 20 69 6e 73 69 64 65 20 | 6f 75 72 0d 73 74 72 75 | inside |our.stru|
|00001530| 63 74 75 72 65 20 61 6e | 64 20 72 65 73 74 6f 72 |cture an|d restor|
|00001540| 65 20 41 35 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |e A5 bef|ore call|
|00001550| 69 6e 67 20 6f 75 72 20 | 54 61 73 6b 28 29 2e 0d |ing our |Task()..|
|00001560| 0d 41 20 66 75 72 74 68 | 65 72 20 73 75 62 74 6c |.A furth|er subtl|
|00001570| 65 74 79 20 69 73 20 74 | 68 61 74 20 74 68 65 20 |ety is t|hat the |
|00001580| 6e 65 77 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 6f |new gene|ration o|
|00001590| 66 20 6f 70 74 69 6d 69 | 7a 69 6e 67 20 63 6f 6d |f optimi|zing com|
|000015a0| 70 69 6c 65 72 73 20 6d | 69 67 68 74 0d 6e 6f 74 |pilers m|ight.not|
|000015b0| 69 63 65 20 74 68 61 74 | 20 41 35 20 69 73 20 62 |ice that| A5 is b|
|000015c0| 65 69 6e 67 20 6d 6f 64 | 69 66 69 65 64 2c 20 73 |eing mod|ified, s|
|000015d0| 6f 20 69 74 20 77 6f 75 | 6c 64 20 62 65 20 64 61 |o it wou|ld be da|
|000015e0| 6e 67 65 72 6f 75 73 20 | 74 6f 20 61 63 63 65 73 |ngerous |to acces|
|000015f0| 73 20 67 6c 6f 62 61 6c | 73 20 61 74 0d 61 6c 6c |s global|s at.all|
|00001600| 20 69 6e 20 49 6e 74 65 | 72 72 75 70 74 53 65 72 | in Inte|rruptSer|
|00001610| 76 69 63 65 52 6f 75 74 | 69 6e 65 28 29 2c 20 65 |viceRout|ine(), e|
|00001620| 76 65 6e 20 74 68 6f 75 | 67 68 20 69 74 27 73 20 |ven thou|gh it's |
|00001630| 73 61 66 65 20 74 6f 20 | 64 6f 20 73 6f 20 69 6e |safe to |do so in|
|00001640| 20 54 61 73 6b 28 29 2e | 20 49 6e 0d 66 61 63 74 | Task().| In.fact|
|00001650| 20 54 61 73 6b 28 29 20 | 64 6f 65 73 6e 27 74 20 | Task() |doesn't |
|00001660| 75 73 65 20 61 6e 79 20 | 67 6c 6f 62 61 6c 73 2c |use any |globals,|
|00001670| 20 62 75 74 20 69 74 20 | 63 6f 75 6c 64 2e 0d 0d | but it |could...|
|00001680| 54 68 65 20 66 61 63 74 | 20 74 68 61 74 20 74 68 |The fact| that th|
|00001690| 65 20 61 64 64 72 65 73 | 73 20 6f 66 20 6f 75 72 |e addres|s of our|
|000016a0| 20 73 74 72 75 63 74 75 | 72 65 20 69 73 20 69 6e | structu|re is in|
|000016b0| 20 72 65 67 69 73 74 65 | 72 20 41 30 20 77 68 65 | registe|r A0 whe|
|000016c0| 6e 20 74 68 65 20 69 6e | 74 65 72 72 75 70 74 0d |n the in|terrupt.|
|000016d0| 73 65 72 76 69 63 65 20 | 72 6f 75 74 69 6e 65 20 |service |routine |
|000016e0| 69 73 20 63 61 6c 6c 65 | 64 20 72 65 73 75 6c 74 |is calle|d result|
|000016f0| 73 20 66 72 6f 6d 20 74 | 68 65 20 66 61 63 74 20 |s from t|he fact |
|00001700| 74 68 61 74 20 74 68 65 | 20 6c 6f 77 20 6c 65 76 |that the| low lev|
|00001710| 65 6c 20 68 61 72 64 77 | 61 72 65 20 56 42 4c 0d |el hardw|are VBL.|
|00001720| 69 6e 74 65 72 72 75 70 | 74 20 69 73 20 69 6e 74 |interrup|t is int|
|00001730| 65 72 63 65 70 74 65 64 | 20 62 79 20 74 68 65 20 |ercepted| by the |
|00001740| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00001750| 2c 20 77 68 69 63 68 20 | 74 68 65 6e 20 63 61 6c |, which |then cal|
|00001760| 6c 73 20 6f 75 72 20 72 | 6f 75 74 69 6e 65 2e 0d |ls our r|outine..|
|00001770| 0d 54 68 65 20 56 42 4c | 54 61 73 6b 41 6e 64 41 |.The VBL|TaskAndA|
|00001780| 35 20 73 74 72 75 63 74 | 20 65 78 74 65 6e 64 73 |5 struct| extends|
|00001790| 20 41 70 70 6c 65 27 73 | 20 56 42 4c 54 61 73 6b | Apple's| VBLTask|
|000017a0| 20 73 74 72 75 63 74 20 | 62 79 20 61 64 64 69 6e | struct |by addin|
|000017b0| 67 20 73 6f 6d 65 20 75 | 73 65 66 75 6c 0d 69 6e |g some u|seful.in|
|000017c0| 66 6f 72 6d 61 74 69 6f | 6e 20 61 74 20 74 68 65 |formatio|n at the|
|000017d0| 20 65 6e 64 2e 20 59 6f | 75 20 6d 61 79 20 63 68 | end. Yo|u may ch|
|000017e0| 6f 6f 73 65 20 74 6f 20 | 63 6f 70 79 20 74 68 69 |oose to |copy thi|
|000017f0| 73 2c 20 6f 72 20 64 65 | 66 69 6e 65 20 79 6f 75 |s, or de|fine you|
|00001800| 72 20 6f 77 6e 2c 20 61 | 64 64 69 6e 67 0d 6d 6f |r own, a|dding.mo|
|00001810| 72 65 20 73 74 75 66 66 | 20 61 74 20 74 68 65 20 |re stuff| at the |
|00001820| 65 6e 64 2e 20 48 6f 77 | 65 76 65 72 2c 20 79 6f |end. How|ever, yo|
|00001830| 75 20 6d 61 79 20 6e 6f | 74 20 77 61 6e 74 20 74 |u may no|t want t|
|00001840| 6f 20 62 6f 74 68 65 72 | 2c 20 63 6f 6e 73 69 64 |o bother|, consid|
|00001850| 65 72 69 6e 67 20 74 68 | 61 74 0d 79 6f 75 72 20 |ering th|at.your |
|00001860| 69 6e 74 65 72 72 75 70 | 74 20 73 65 72 76 69 63 |interrup|t servic|
|00001870| 65 20 72 6f 75 74 69 6e | 65 20 63 61 6e 20 66 72 |e routin|e can fr|
|00001880| 65 65 6c 79 20 61 63 63 | 65 73 73 20 67 6c 6f 62 |eely acc|ess glob|
|00001890| 61 6c 20 76 61 72 69 61 | 62 6c 65 73 2e 0d 41 6c |al varia|bles..Al|
|000018a0| 74 65 72 6e 61 74 69 76 | 65 6c 79 2c 20 49 20 61 |ternativ|ely, I a|
|000018b0| 64 64 65 64 20 61 20 67 | 65 6e 65 72 69 63 20 70 |dded a g|eneric p|
|000018c0| 6f 69 6e 74 65 72 20 61 | 74 20 74 68 65 20 65 6e |ointer a|t the en|
|000018d0| 64 2c 20 77 68 69 63 68 | 20 79 6f 75 20 6d 61 79 |d, which| you may|
|000018e0| 20 75 73 65 20 74 6f 20 | 70 61 73 73 0d 74 68 65 | use to |pass.the|
|000018f0| 20 61 64 64 72 65 73 73 | 20 6f 66 20 61 6e 79 20 | address| of any |
|00001900| 73 74 75 66 66 20 74 68 | 61 74 20 79 6f 75 20 77 |stuff th|at you w|
|00001910| 61 6e 74 20 74 6f 20 61 | 63 63 65 73 73 20 77 69 |ant to a|ccess wi|
|00001920| 74 68 69 6e 20 79 6f 75 | 72 20 73 75 62 72 6f 75 |thin you|r subrou|
|00001930| 74 69 6e 65 2e 0d 0d 4d | 61 63 69 6e 74 6f 73 68 |tine...M|acintosh|
|00001940| 20 54 65 63 68 6e 69 63 | 61 6c 20 4e 6f 74 65 20 | Technic|al Note |
|00001950| 31 38 30 20 28 22 4d 75 | 6c 74 69 66 69 6e 64 65 |180 ("Mu|ltifinde|
|00001960| 72 20 4d 69 73 63 65 6c | 6c 61 6e 65 61 22 29 2c |r Miscel|lanea"),|
|00001970| 20 70 2e 20 35 20 73 61 | 79 73 3a 0d 22 47 65 74 | p. 5 sa|ys:."Get|
|00001980| 56 42 4c 52 65 63 28 29 | 20 72 65 74 75 72 6e 73 |VBLRec()| returns|
|00001990| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 | the add|ress of |
|000019a0| 74 68 65 20 56 42 4c 52 | 65 63 20 61 73 73 6f 63 |the VBLR|ec assoc|
|000019b0| 69 61 74 65 64 20 77 69 | 74 68 20 6f 75 72 20 56 |iated wi|th our V|
|000019c0| 42 4c 20 74 61 73 6b 2e | 0d 54 68 69 73 20 77 6f |BL task.|.This wo|
|000019d0| 72 6b 73 20 62 65 63 61 | 75 73 65 20 6f 6e 20 65 |rks beca|use on e|
|000019e0| 6e 74 72 79 20 69 6e 74 | 6f 20 74 68 65 20 56 42 |ntry int|o the VB|
|000019f0| 4c 20 74 61 73 6b 2c 20 | 41 30 20 70 6f 69 6e 74 |L task, |A0 point|
|00001a00| 73 20 74 6f 20 74 68 65 | 20 74 68 65 56 42 4c 54 |s to the| theVBLT|
|00001a10| 61 73 6b 20 66 69 65 6c | 64 0d 69 6e 20 74 68 65 |ask fiel|d.in the|
|00001a20| 20 56 42 4c 52 65 63 20 | 72 65 63 6f 72 64 2c 20 | VBLRec |record, |
|00001a30| 77 68 69 63 68 20 69 73 | 20 74 68 65 20 66 69 72 |which is| the fir|
|00001a40| 73 74 20 66 69 65 6c 64 | 20 69 6e 20 74 68 65 20 |st field| in the |
|00001a50| 72 65 63 6f 72 64 20 61 | 6e 64 20 74 68 61 74 20 |record a|nd that |
|00001a60| 69 73 20 74 68 65 0d 61 | 64 64 72 65 73 73 20 77 |is the.a|ddress w|
|00001a70| 65 20 72 65 74 75 72 6e | 2e 20 4e 6f 74 65 20 74 |e return|. Note t|
|00001a80| 68 61 74 20 74 68 69 73 | 20 6d 65 74 68 6f 64 20 |hat this| method |
|00001a90| 77 6f 72 6b 73 20 77 68 | 65 74 68 65 72 20 74 68 |works wh|ether th|
|00001aa0| 65 20 56 42 4c 52 65 63 | 20 69 73 20 61 6c 6c 6f |e VBLRec| is allo|
|00001ab0| 63 61 74 65 64 0d 67 6c | 6f 62 61 6c 6c 79 2c 20 |cated.gl|obally, |
|00001ac0| 69 6e 20 74 68 65 20 68 | 65 61 70 2e 2e 2e 6f 72 |in the h|eap...or|
|00001ad0| 2e 2e 2e 6f 6e 20 74 68 | 65 20 73 74 61 63 6b 2e |...on th|e stack.|
|00001ae0| 20 2e 2e 2e 20 54 68 69 | 73 20 74 72 69 63 6b 20 | ... Thi|s trick |
|00001af0| 61 6c 6c 6f 77 73 20 75 | 73 20 74 6f 20 67 65 74 |allows u|s to get|
|00001b00| 20 74 6f 0d 74 68 65 20 | 73 61 76 65 64 20 41 35 | to.the |saved A5|
|00001b10| 2c 20 62 75 74 20 69 74 | 20 63 6f 75 6c 64 20 61 |, but it| could a|
|00001b20| 6c 73 6f 20 62 65 20 75 | 73 65 64 20 74 6f 20 67 |lso be u|sed to g|
|00001b30| 65 74 20 74 6f 20 61 6e | 79 74 68 69 6e 67 20 77 |et to an|ything w|
|00001b40| 65 20 77 61 6e 74 65 64 | 20 74 6f 20 73 74 6f 72 |e wanted| to stor|
|00001b50| 65 20 69 6e 0d 74 68 65 | 20 72 65 63 6f 72 64 2e |e in.the| record.|
|00001b60| 22 20 28 71 75 6f 74 65 | 64 20 62 79 20 4a 61 6d |" (quote|d by Jam|
|00001b70| 69 65 20 4d 63 43 61 72 | 74 68 79 20 69 6e 20 63 |ie McCar|thy in c|
|00001b80| 6f 6d 70 2e 73 79 73 2e | 6d 61 63 2e 70 72 6f 67 |omp.sys.|mac.prog|
|00001b90| 20 31 30 2f 31 35 2f 39 | 32 2e 29 0d 0d 48 49 53 | 10/15/9|2.)..HIS|
|00001ba0| 54 4f 52 59 3a 0d 38 2f | 32 32 2f 39 32 20 64 67 |TORY:.8/|22/92 dg|
|00001bb0| 70 20 77 72 6f 74 65 20 | 69 74 2c 20 62 61 73 65 |p wrote |it, base|
|00001bc0| 64 20 6f 6e 20 63 6f 64 | 65 20 65 78 74 72 61 63 |d on cod|e extrac|
|00001bd0| 74 65 64 20 66 72 6f 6d | 20 6d 79 20 4e 6f 69 73 |ted from| my Nois|
|00001be0| 65 56 42 4c 2e 63 0d 38 | 2f 32 36 2f 39 32 09 64 |eVBL.c.8|/26/92.d|
|00001bf0| 67 70 09 61 64 64 65 64 | 20 56 42 4c 52 65 6d 6f |gp.added| VBLRemo|
|00001c00| 76 65 41 6c 6c 28 29 2c | 20 77 68 69 63 68 20 69 |veAll(),| which i|
|00001c10| 73 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |s automa|tically |
|00001c20| 70 6c 61 63 65 64 20 69 | 6e 20 74 68 65 20 5f 61 |placed i|n the _a|
|00001c30| 74 65 78 69 74 28 29 0d | 09 09 09 71 75 65 75 65 |texit().|...queue|
|00001c40| 2c 20 73 6f 20 69 74 20 | 61 6c 6c 20 79 6f 75 72 |, so it |all your|
|00001c50| 20 56 42 4c 20 74 61 73 | 6b 73 20 77 69 6c 6c 20 | VBL tas|ks will |
|00001c60| 62 65 20 72 65 6d 6f 76 | 65 64 20 66 72 6f 6d 20 |be remov|ed from |
|00001c70| 74 68 65 20 71 75 65 75 | 65 20 77 68 65 6e 0d 09 |the queu|e when..|
|00001c80| 09 09 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 20 65 |..your p|rogram e|
|00001c90| 78 69 74 73 2c 20 77 68 | 65 74 68 65 72 20 6e 6f |xits, wh|ether no|
|00001ca0| 72 6d 61 6c 20 6f 72 20 | 61 62 6e 6f 72 6d 61 6c |rmal or |abnormal|
|00001cb0| 6c 79 2e 0d 39 2f 39 2f | 39 32 09 64 67 70 09 66 |ly..9/9/|92.dgp.f|
|00001cc0| 69 78 65 64 20 65 72 72 | 6f 6e 65 6f 75 73 20 61 |ixed err|oneous a|
|00001cd0| 74 74 65 6d 70 74 20 74 | 6f 20 75 73 65 20 73 6c |ttempt t|o use sl|
|00001ce0| 6f 74 20 7a 65 72 6f 20 | 77 68 65 6e 20 4e 55 4c |ot zero |when NUL|
|00001cf0| 4c 20 64 65 76 69 63 65 | 20 77 61 73 20 70 61 73 |L device| was pas|
|00001d00| 73 65 64 2e 0d 39 2f 31 | 30 2f 39 32 09 64 67 70 |sed..9/1|0/92.dgp|
|00001d10| 09 61 64 64 65 64 20 63 | 61 6c 6c 73 20 74 6f 20 |.added c|alls to |
|00001d20| 56 4d 20 74 6f 20 48 6f | 6c 64 4d 65 6d 6f 72 79 |VM to Ho|ldMemory|
|00001d30| 28 29 20 61 6e 64 20 55 | 6e 48 6f 6c 64 4d 65 6d |() and U|nHoldMem|
|00001d40| 6f 72 79 28 29 2e 20 41 | 63 63 6f 72 64 69 6e 67 |ory(). A|ccording|
|00001d50| 20 74 6f 20 41 70 70 6c | 65 27 73 0d 09 09 09 4d | to Appl|e's....M|
|00001d60| 65 6d 6f 72 79 20 62 6f | 6f 6b 20 74 68 69 73 20 |emory bo|ok this |
|00001d70| 69 73 6e 27 74 20 73 74 | 72 69 63 74 6c 79 20 6e |isn't st|rictly n|
|00001d80| 65 63 65 73 73 61 72 79 | 2c 20 73 69 6e 63 65 20 |ecessary|, since |
|00001d90| 56 42 4c 20 74 61 73 6b | 73 20 77 69 6c 6c 20 0d |VBL task|s will .|
|00001da0| 09 09 09 62 65 20 63 61 | 6c 6c 65 64 20 6f 6e 6c |...be ca|lled onl|
|00001db0| 79 20 77 68 65 6e 20 69 | 74 27 73 20 73 61 66 65 |y when i|t's safe|
|00001dc0| 2e 0d 39 2f 31 37 2f 39 | 32 09 64 67 70 09 54 72 |..9/17/9|2.dgp.Tr|
|00001dd0| 61 6e 73 66 65 72 72 65 | 64 20 46 72 61 6d 65 53 |ansferre|d FrameS|
|00001de0| 75 62 72 6f 75 74 69 6e | 65 28 29 20 68 65 72 65 |ubroutin|e() here|
|00001df0| 20 66 72 6f 6d 20 47 44 | 46 72 61 6d 65 52 61 74 | from GD|FrameRat|
|00001e00| 65 2e 63 2e 20 4e 6f 77 | 20 75 73 65 20 0d 09 09 |e.c. Now| use ...|
|00001e10| 09 46 72 61 6d 65 53 75 | 62 72 6f 75 74 69 6e 65 |.FrameSu|broutine|
|00001e20| 28 29 20 69 6e 73 74 65 | 61 64 20 6f 66 20 53 69 |() inste|ad of Si|
|00001e30| 6d 70 6c 65 56 42 4c 53 | 75 62 72 6f 75 74 69 6e |mpleVBLS|ubroutin|
|00001e40| 65 28 29 20 61 73 20 74 | 68 65 20 64 65 66 61 75 |e() as t|he defau|
|00001e50| 6c 74 2c 0d 09 09 09 70 | 72 6f 76 69 64 65 64 20 |lt,....p|rovided |
|00001e60| 77 65 20 63 61 6e 20 75 | 73 65 20 54 69 6d 65 72 |we can u|se Timer|
|00001e70| 2e 63 2c 20 6f 74 68 65 | 72 77 69 73 65 20 66 61 |.c, othe|rwise fa|
|00001e80| 6c 6c 20 62 61 63 6b 20 | 74 6f 20 75 73 69 6e 67 |ll back |to using|
|00001e90| 20 0d 09 09 09 53 69 6d | 70 6c 65 56 42 4c 53 75 | ....Sim|pleVBLSu|
|00001ea0| 62 72 6f 75 74 69 6e 65 | 2e 0d 31 30 2f 39 2f 39 |broutine|..10/9/9|
|00001eb0| 32 09 64 67 70 09 41 75 | 74 6f 6d 61 74 69 63 61 |2.dgp.Au|tomatica|
|00001ec0| 6c 6c 79 20 73 65 74 20 | 75 70 20 61 6e 64 20 64 |lly set |up and d|
|00001ed0| 69 73 70 6f 73 65 20 6f | 66 20 74 68 65 20 74 69 |ispose o|f the ti|
|00001ee0| 6d 65 72 20 75 73 65 64 | 20 62 79 20 46 72 61 6d |mer used| by Fram|
|00001ef0| 65 53 75 62 72 6f 75 74 | 69 6e 65 2e 0d 09 09 09 |eSubrout|ine.....|
|00001f00| 41 64 64 65 64 20 61 20 | 66 69 65 6c 64 20 74 6f |Added a |field to|
|00001f10| 20 74 68 65 20 56 42 4c | 54 61 73 6b 41 6e 64 41 | the VBL|TaskAndA|
|00001f20| 35 20 73 74 72 75 63 74 | 75 72 65 20 74 6f 20 68 |5 struct|ure to h|
|00001f30| 6f 6c 64 20 74 68 65 20 | 74 69 6d 65 72 20 70 6f |old the |timer po|
|00001f40| 69 6e 74 65 72 2c 0d 09 | 09 09 69 6e 73 74 65 61 |inter,..|..instea|
|00001f50| 64 20 6f 66 20 75 73 69 | 6e 67 20 75 70 20 74 68 |d of usi|ng up th|
|00001f60| 65 20 67 65 6e 65 72 69 | 63 20 70 74 72 2e 0d 09 |e generi|c ptr...|
|00001f70| 09 09 57 41 52 4e 49 4e | 47 3a 20 6f 6c 64 20 70 |..WARNIN|G: old p|
|00001f80| 72 6f 67 72 61 6d 73 20 | 28 77 72 69 74 74 65 6e |rograms |(written|
|00001f90| 20 64 75 72 69 6e 67 20 | 39 2f 39 32 29 20 74 68 | during |9/92) th|
|00001fa0| 61 74 20 65 78 70 6c 69 | 63 69 74 6c 79 20 72 65 |at expli|citly re|
|00001fb0| 71 75 65 73 74 20 75 73 | 65 20 6f 66 20 0d 09 09 |quest us|e of ...|
|00001fc0| 09 46 72 61 6d 65 53 75 | 62 72 6f 75 74 69 6e 65 |.FrameSu|broutine|
|00001fd0| 20 6d 75 73 74 20 62 65 | 20 63 68 61 6e 67 65 64 | must be| changed|
|00001fe0| 2c 20 62 65 63 61 75 73 | 65 20 61 74 20 74 68 61 |, becaus|e at tha|
|00001ff0| 74 20 74 69 6d 65 20 69 | 74 20 77 61 73 20 74 68 |t time i|t was th|
|00002000| 65 20 75 73 65 72 27 73 | 20 0d 09 09 09 72 65 73 |e user's| ....res|
|00002010| 70 6f 6e 73 69 62 69 6c | 69 74 79 20 74 6f 20 73 |ponsibil|ity to s|
|00002020| 65 74 20 75 70 20 61 6e | 64 20 64 69 73 70 6f 73 |et up an|d dispos|
|00002030| 65 20 6f 66 20 74 68 65 | 20 74 69 6d 65 72 2c 20 |e of the| timer, |
|00002040| 77 68 65 72 65 61 73 20 | 69 74 27 73 20 6e 6f 77 |whereas |it's now|
|00002050| 20 64 6f 6e 65 20 0d 09 | 09 09 66 6f 72 20 79 6f | done ..|..for yo|
|00002060| 75 2e 20 54 6f 20 72 65 | 6d 69 6e 64 20 79 6f 75 |u. To re|mind you|
|00002070| 20 74 6f 20 6d 61 6b 65 | 20 74 68 69 73 20 63 68 | to make| this ch|
|00002080| 61 6e 67 65 20 22 46 72 | 61 6d 65 53 75 62 72 6f |ange "Fr|ameSubro|
|00002090| 75 74 69 6e 65 22 20 69 | 73 20 6e 6f 20 6c 6f 6e |utine" i|s no lon|
|000020a0| 67 65 72 20 0d 09 09 09 | 69 6e 20 56 69 64 65 6f |ger ....|in Video|
|000020b0| 54 6f 6f 6c 62 6f 78 2e | 68 2c 20 69 74 27 73 20 |Toolbox.|h, it's |
|000020c0| 74 72 65 61 74 65 64 20 | 61 73 20 61 20 70 72 69 |treated |as a pri|
|000020d0| 76 61 74 65 20 72 6f 75 | 74 69 6e 65 20 68 65 72 |vate rou|tine her|
|000020e0| 65 2e 20 54 6f 20 6f 62 | 74 61 69 6e 20 74 68 65 |e. To ob|tain the|
|000020f0| 20 0d 09 09 09 73 65 72 | 76 69 63 65 73 20 6f 66 | ....ser|vices of|
|00002100| 20 46 72 61 6d 65 53 75 | 62 72 6f 75 74 69 6e 65 | FrameSu|broutine|
|00002110| 2c 20 6a 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |, just s|pecify a|
|00002120| 20 4e 55 4c 4c 20 69 6e | 20 74 68 65 20 56 42 4c | NULL in| the VBL|
|00002130| 54 61 73 6b 41 6e 64 41 | 35 20 0d 09 09 09 73 75 |TaskAndA|5 ....su|
|00002140| 62 72 6f 75 74 69 6e 65 | 20 66 69 65 6c 64 2e 0d |broutine| field..|
|00002150| 31 31 2f 31 37 2f 39 32 | 20 64 67 70 20 49 6e 20 |11/17/92| dgp In |
|00002160| 56 42 4c 52 65 6d 6f 76 | 65 28 29 2c 20 66 69 72 |VBLRemov|e(), fir|
|00002170| 73 74 20 64 69 73 61 62 | 6c 65 20 74 68 65 20 69 |st disab|le the i|
|00002180| 6e 74 65 72 72 75 70 74 | 2c 20 74 68 65 6e 20 63 |nterrupt|, then c|
|00002190| 6c 65 61 6e 20 75 70 2e | 0d 09 09 09 46 69 78 65 |lean up.|....Fixe|
|000021a0| 64 20 65 72 72 6f 72 20 | 74 68 61 74 20 63 6f 75 |d error |that cou|
|000021b0| 6c 64 20 63 61 75 73 65 | 20 62 75 73 20 65 72 72 |ld cause| bus err|
|000021c0| 6f 72 20 69 6e 20 56 42 | 4c 52 65 6d 6f 76 65 41 |or in VB|LRemoveA|
|000021d0| 6c 6c 2e 0d 09 09 09 56 | 42 4c 49 6e 73 74 61 6c |ll.....V|BLInstal|
|000021e0| 6c 28 29 20 6e 6f 77 20 | 69 6e 73 74 61 6c 6c 73 |l() now |installs|
|000021f0| 20 56 42 4c 52 65 6d 6f | 76 65 41 6c 6c 28 29 20 | VBLRemo|veAll() |
|00002200| 6f 6e 6c 79 20 6f 6e 63 | 65 20 69 6e 20 74 68 65 |only onc|e in the|
|00002210| 20 5f 61 74 65 78 69 74 | 28 29 0d 09 09 09 71 75 | _atexit|()....qu|
|00002220| 65 75 65 2c 20 6e 6f 20 | 6d 61 74 74 65 72 20 68 |eue, no |matter h|
|00002230| 6f 77 20 6d 61 6e 79 20 | 74 69 6d 65 73 20 79 6f |ow many |times yo|
|00002240| 75 20 63 61 6c 6c 20 69 | 74 2e 0d 31 31 2f 32 34 |u call i|t..11/24|
|00002250| 2f 39 32 20 64 67 70 20 | 4d 69 6e 6f 72 20 75 70 |/92 dgp |Minor up|
|00002260| 64 61 74 69 6e 67 20 6f | 66 20 63 6f 6d 6d 65 6e |dating o|f commen|
|00002270| 74 73 2e 0d 37 2f 39 2f | 39 33 09 64 67 70 09 54 |ts..7/9/|93.dgp.T|
|00002280| 65 73 74 20 4d 41 54 4c | 41 42 20 69 6e 20 69 66 |est MATL|AB in if|
|00002290| 28 29 20 69 6e 73 74 65 | 61 64 20 6f 66 20 23 69 |() inste|ad of #i|
|000022a0| 66 2e 20 0d 32 2f 32 38 | 2f 39 34 09 64 67 70 09 |f. .2/28|/94.dgp.|
|000022b0| 49 6e 20 72 65 73 70 6f | 6e 73 65 20 74 6f 20 71 |In respo|nse to q|
|000022c0| 75 65 72 79 20 62 79 20 | 4d 69 6b 65 20 54 61 72 |uery by |Mike Tar|
|000022d0| 72 20 28 74 61 72 72 2d | 6d 69 63 68 61 65 6c 40 |r (tarr-|michael@|
|000022e0| 43 53 2e 59 41 4c 45 2e | 45 44 55 29 2c 20 63 68 |CS.YALE.|EDU), ch|
|000022f0| 61 6e 67 65 64 20 0d 09 | 09 09 66 72 61 6d 65 73 |anged ..|..frames|
|00002300| 20 61 72 67 75 6d 65 6e | 74 20 66 72 6f 6d 20 69 | argumen|t from i|
|00002310| 6e 74 20 74 6f 20 6c 6f | 6e 67 2c 20 61 6e 64 20 |nt to lo|ng, and |
|00002320| 6e 6f 77 20 61 6c 6c 6f | 77 20 66 72 61 6d 65 73 |now allo|w frames|
|00002330| 3d 3d 2d 31 20 74 6f 20 | 72 65 71 75 65 73 74 20 |==-1 to |request |
|00002340| 0d 09 09 09 74 68 61 74 | 20 74 68 65 20 69 6e 74 |....that| the int|
|00002350| 65 72 72 75 70 74 20 73 | 65 72 76 69 63 65 20 72 |errupt s|ervice r|
|00002360| 6f 75 74 69 6e 65 20 63 | 6f 6e 74 69 6e 75 65 20 |outine c|ontinue |
|00002370| 77 6f 72 6b 69 6e 67 20 | 69 6e 64 65 66 69 6e 69 |working |indefini|
|00002380| 74 65 6c 79 2e 0d 33 2f | 35 2f 39 34 09 64 67 70 |tely..3/|5/94.dgp|
|00002390| 09 49 6e 20 72 65 73 70 | 6f 6e 73 65 20 74 6f 20 |.In resp|onse to |
|000023a0| 61 20 62 75 67 20 72 65 | 70 6f 72 74 20 62 79 20 |a bug re|port by |
|000023b0| 4d 69 6b 65 20 54 61 72 | 72 2c 20 66 69 6e 69 73 |Mike Tar|r, finis|
|000023c0| 68 65 64 20 74 68 65 20 | 32 2f 32 38 2f 39 34 20 |hed the |2/28/94 |
|000023d0| 63 68 61 6e 67 65 2c 0d | 09 09 09 77 68 69 63 68 |change,.|...which|
|000023e0| 20 49 27 64 20 66 6f 6f | 6c 69 73 68 6c 79 20 6f | I'd foo|lishly o|
|000023f0| 6e 6c 79 20 64 6f 6e 65 | 20 74 6f 20 53 69 6d 70 |nly done| to Simp|
|00002400| 6c 65 56 42 4c 53 75 62 | 72 6f 75 74 69 6e 65 20 |leVBLSub|routine |
|00002410| 61 6e 64 20 6e 6f 74 20 | 74 6f 20 0d 09 09 09 46 |and not |to ....F|
|00002420| 72 61 6d 65 53 75 62 72 | 6f 75 74 69 6e 65 2e 0d |rameSubr|outine..|
|00002430| 35 2f 32 38 2f 39 34 09 | 64 67 70 09 4d 61 64 65 |5/28/94.|dgp.Made|
|00002440| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00002450| 20 41 70 70 6c 65 27 73 | 20 55 6e 69 76 65 72 73 | Apple's| Univers|
|00002460| 61 6c 20 48 65 61 64 65 | 72 73 2e 20 49 20 61 6c |al Heade|rs. I al|
|00002470| 73 6f 20 61 74 74 65 6d | 70 74 65 64 20 74 6f 0d |so attem|pted to.|
|00002480| 09 09 09 6d 61 6b 65 20 | 74 68 65 20 63 6f 64 65 |...make |the code|
|00002490| 20 50 6f 77 65 72 50 43 | 20 63 6f 6d 70 61 74 69 | PowerPC| compati|
|000024a0| 62 6c 65 2c 20 62 75 74 | 20 74 68 61 74 20 72 65 |ble, but| that re|
|000024b0| 6d 61 69 6e 73 20 74 6f | 20 62 65 20 74 65 73 74 |mains to| be test|
|000024c0| 65 64 2e 0d 31 30 2f 31 | 2f 39 34 09 64 67 70 09 |ed..10/1|/94.dgp.|
|000024d0| 41 64 64 65 64 20 6e 65 | 77 20 22 66 72 61 6d 65 |Added ne|w "frame|
|000024e0| 22 20 66 69 65 6c 64 20 | 74 6f 20 56 42 4c 54 61 |" field |to VBLTa|
|000024f0| 73 6b 41 6e 64 41 35 20 | 73 74 72 75 63 74 2c 20 |skAndA5 |struct, |
|00002500| 77 68 69 63 68 20 63 6f | 75 6e 74 73 20 75 70 20 |which co|unts up |
|00002510| 66 72 6f 6d 20 7a 65 72 | 6f 2e 0d 31 30 2f 32 34 |from zer|o..10/24|
|00002520| 2f 39 34 20 64 67 70 20 | 4d 61 64 65 20 64 65 63 |/94 dgp |Made dec|
|00002530| 6c 61 72 61 74 69 6f 6e | 20 6f 66 20 47 65 74 41 |laration| of GetA|
|00002540| 30 28 29 20 65 78 70 6c | 69 63 69 74 6c 79 20 69 |0() expl|icitly i|
|00002550| 6e 64 69 63 61 74 65 20 | 74 68 61 74 20 61 6e 73 |ndicate |that ans|
|00002560| 77 65 72 20 69 73 20 72 | 65 74 75 72 6e 65 64 20 |wer is r|eturned |
|00002570| 69 6e 20 44 30 2c 20 66 | 6f 72 0d 62 65 74 74 65 |in D0, f|or.bette|
|00002580| 72 20 63 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 20 |r compat|ibility |
|00002590| 77 69 74 68 20 4d 65 74 | 72 6f 77 65 72 6b 73 20 |with Met|rowerks |
|000025a0| 43 6f 64 65 57 61 72 72 | 69 6f 72 20 43 2e 0d 31 |CodeWarr|ior C..1|
|000025b0| 30 2f 32 37 2f 39 34 20 | 64 67 70 20 49 74 20 69 |0/27/94 |dgp It i|
|000025c0| 73 20 76 65 72 79 20 61 | 6e 6e 6f 79 69 6e 67 20 |s very a|nnoying |
|000025d0| 66 6f 72 20 74 68 65 20 | 6d 61 63 68 69 6e 65 20 |for the |machine |
|000025e0| 74 6f 20 63 72 61 73 68 | 20 61 6e 79 74 69 6d 65 |to crash| anytime|
|000025f0| 20 79 6f 75 20 74 72 79 | 20 74 6f 20 71 75 69 74 | you try| to quit|
|00002600| 20 79 6f 75 72 20 61 70 | 70 6c 69 63 61 74 69 6f | your ap|plicatio|
|00002610| 6e 0d 62 79 20 65 73 63 | 61 70 69 6e 67 20 76 69 |n.by esc|aping vi|
|00002620| 61 20 4d 61 63 73 42 75 | 67 73 20 65 73 63 61 70 |a MacsBu|gs escap|
|00002630| 65 20 74 6f 20 73 68 65 | 6c 6c 2e 20 54 68 65 20 |e to she|ll. The |
|00002640| 70 72 6f 62 6c 65 6d 20 | 69 73 20 74 68 61 74 20 |problem |is that |
|00002650| 43 6f 64 65 57 61 72 72 | 69 6f 72 20 34 2e 35 20 |CodeWarr|ior 4.5 |
|00002660| 64 6f 65 73 6e 27 74 20 | 61 74 74 61 63 68 0d 74 |doesn't |attach.t|
|00002670| 68 65 20 61 74 65 78 69 | 74 28 29 20 74 61 73 6b |he atexi|t() task|
|00002680| 73 20 74 6f 20 5f 45 73 | 63 61 70 65 54 6f 53 68 |s to _Es|capeToSh|
|00002690| 65 6c 6c 2e 20 53 6f 20 | 49 20 64 6f 20 69 74 20 |ell. So |I do it |
|000026a0| 68 65 72 65 2e 20 0d 2a | 2f 0d 23 69 6e 63 6c 75 |here. .*|/.#inclu|
|000026b0| 64 65 20 22 56 69 64 65 | 6f 54 6f 6f 6c 62 6f 78 |de "Vide|oToolbox|
|000026c0| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 3c 54 72 |.h".#inc|lude <Tr|
|000026d0| 61 70 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |aps.h>.#|include |
|000026e0| 3c 52 65 74 72 61 63 65 | 2e 68 3e 0d 76 6f 69 64 |<Retrace|.h>.void|
|000026f0| 20 56 42 4c 52 65 6d 6f | 76 65 41 6c 6c 28 76 6f | VBLRemo|veAll(vo|
|00002700| 69 64 29 3b 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |id);.sta|tic void|
|00002710| 20 50 61 74 63 68 45 78 | 69 74 54 6f 53 68 65 6c | PatchEx|itToShel|
|00002720| 6c 28 76 6f 69 64 29 3b | 0d 23 69 66 20 21 55 4e |l(void);|.#if !UN|
|00002730| 49 56 45 52 53 41 4c 5f | 48 45 41 44 45 52 53 0d |IVERSAL_|HEADERS.|
|00002740| 09 74 79 70 65 64 65 66 | 20 50 72 6f 63 50 74 72 |.typedef| ProcPtr|
|00002750| 20 55 6e 69 76 65 72 73 | 61 6c 50 72 6f 63 50 74 | Univers|alProcPt|
|00002760| 72 3b 0d 09 74 79 70 65 | 64 65 66 20 70 61 73 63 |r;..type|def pasc|
|00002770| 61 6c 20 76 6f 69 64 20 | 28 2a 52 65 67 69 73 74 |al void |(*Regist|
|00002780| 65 72 36 38 6b 50 72 6f | 63 50 74 72 29 28 76 6f |er68kPro|cPtr)(vo|
|00002790| 69 64 29 3b 0d 09 74 79 | 70 65 64 65 66 20 52 65 |id);..ty|pedef Re|
|000027a0| 67 69 73 74 65 72 36 38 | 6b 50 72 6f 63 50 74 72 |gister68|kProcPtr|
|000027b0| 20 56 42 4c 55 50 50 3b | 0d 09 23 64 65 66 69 6e | VBLUPP;|..#defin|
|000027c0| 65 20 4e 65 77 56 42 4c | 50 72 6f 63 28 75 73 65 |e NewVBL|Proc(use|
|000027d0| 72 52 6f 75 74 69 6e 65 | 29 20 28 28 56 42 4c 55 |rRoutine|) ((VBLU|
|000027e0| 50 50 29 28 75 73 65 72 | 52 6f 75 74 69 6e 65 29 |PP)(user|Routine)|
|000027f0| 29 0d 09 23 64 65 66 69 | 6e 65 20 44 69 73 70 6f |)..#defi|ne Dispo|
|00002800| 73 65 52 6f 75 74 69 6e | 65 44 65 73 63 72 69 70 |seRoutin|eDescrip|
|00002810| 74 6f 72 28 75 73 65 72 | 52 6f 75 74 69 6e 65 29 |tor(user|Routine)|
|00002820| 20 28 29 0d 23 65 6e 64 | 69 66 0d 23 69 66 20 5f | ().#end|if.#if _|
|00002830| 5f 70 6f 77 65 72 63 0d | 09 76 6f 69 64 20 56 42 |_powerc.|.void VB|
|00002840| 4c 49 6e 74 65 72 72 75 | 70 74 53 65 72 76 69 63 |LInterru|ptServic|
|00002850| 65 52 6f 75 74 69 6e 65 | 28 72 65 67 69 73 74 65 |eRoutine|(registe|
|00002860| 72 20 56 42 4c 54 61 73 | 6b 41 6e 64 41 35 20 2a |r VBLTas|kAndA5 *|
|00002870| 76 62 6c 44 61 74 61 29 | 3b 0d 23 65 6c 73 65 0d |vblData)|;.#else.|
|00002880| 09 76 6f 69 64 20 56 42 | 4c 49 6e 74 65 72 72 75 |.void VB|LInterru|
|00002890| 70 74 53 65 72 76 69 63 | 65 52 6f 75 74 69 6e 65 |ptServic|eRoutine|
|000028a0| 28 76 6f 69 64 29 3b 0d | 23 65 6e 64 69 66 0d 73 |(void);.|#endif.s|
|000028b0| 74 61 74 69 63 20 76 6f | 69 64 20 46 72 61 6d 65 |tatic vo|id Frame|
|000028c0| 53 75 62 72 6f 75 74 69 | 6e 65 28 56 42 4c 54 61 |Subrouti|ne(VBLTa|
|000028d0| 73 6b 41 6e 64 41 35 20 | 2a 76 62 6c 44 61 74 61 |skAndA5 |*vblData|
|000028e0| 29 3b 0d 0d 2f 2a 20 54 | 68 69 73 20 69 73 20 6a |);../* T|his is j|
|000028f0| 75 73 74 20 66 6f 72 20 | 72 65 66 65 72 65 6e 63 |ust for |referenc|
|00002900| 65 2e 20 54 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |e. The o|riginal |
|00002910| 69 73 20 69 6e 20 56 69 | 64 65 6f 54 6f 6f 6c 62 |is in Vi|deoToolb|
|00002920| 6f 78 2e 68 0d 73 74 72 | 75 63 74 20 56 42 4c 54 |ox.h.str|uct VBLT|
|00002930| 61 73 6b 41 6e 64 41 35 | 20 7b 0d 20 20 20 20 76 |askAndA5| {. v|
|00002940| 6f 6c 61 74 69 6c 65 20 | 56 42 4c 54 61 73 6b 20 |olatile |VBLTask |
|00002950| 76 62 6c 3b 0d 20 20 20 | 20 6c 6f 6e 67 20 6f 75 |vbl;. | long ou|
|00002960| 72 41 35 3b 0d 09 23 69 | 66 20 47 45 4e 45 52 41 |rA5;..#i|f GENERA|
|00002970| 54 49 4e 47 43 46 4d 0d | 09 20 20 20 20 55 6e 69 |TINGCFM.|. Uni|
|00002980| 76 65 72 73 61 6c 50 72 | 6f 63 50 74 72 20 73 75 |versalPr|ocPtr su|
|00002990| 62 72 6f 75 74 69 6e 65 | 3b 0d 09 23 65 6c 73 65 |broutine|;..#else|
|000029a0| 0d 09 20 20 20 20 76 6f | 69 64 20 28 2a 73 75 62 |.. vo|id (*sub|
|000029b0| 72 6f 75 74 69 6e 65 29 | 28 73 74 72 75 63 74 20 |routine)|(struct |
|000029c0| 56 42 4c 54 61 73 6b 41 | 6e 64 41 35 20 2a 76 62 |VBLTaskA|ndA5 *vb|
|000029d0| 6c 44 61 74 61 29 3b 0d | 09 23 65 6e 64 69 66 0d |lData);.|.#endif.|
|000029e0| 20 20 20 20 47 44 48 61 | 6e 64 6c 65 20 64 65 76 | GDHa|ndle dev|
|000029f0| 69 63 65 3b 0d 20 20 20 | 20 6c 6f 6e 67 20 73 6c |ice;. | long sl|
|00002a00| 6f 74 3b 0d 20 20 20 20 | 76 6f 6c 61 74 69 6c 65 |ot;. |volatile|
|00002a10| 20 6c 6f 6e 67 20 6e 65 | 77 46 72 61 6d 65 3b 09 | long ne|wFrame;.|
|00002a20| 09 09 09 2f 2f 20 42 6f | 6f 6c 65 61 6e 0d 20 20 |...// Bo|olean. |
|00002a30| 20 20 76 6f 6c 61 74 69 | 6c 65 20 6c 6f 6e 67 20 | volati|le long |
|00002a40| 66 72 61 6d 65 3b 09 09 | 09 09 2f 2f 20 63 6f 75 |frame;..|..// cou|
|00002a50| 6e 74 20 75 70 20 66 72 | 6f 6d 20 7a 65 72 6f 0d |nt up fr|om zero.|
|00002a60| 20 20 20 20 76 6f 6c 61 | 74 69 6c 65 20 6c 6f 6e | vola|tile lon|
|00002a70| 67 20 66 72 61 6d 65 73 | 4c 65 66 74 3b 09 09 09 |g frames|Left;...|
|00002a80| 2f 2f 20 63 6f 75 6e 74 | 20 64 6f 77 6e 20 74 6f |// count| down to|
|00002a90| 20 7a 65 72 6f 0d 20 20 | 20 20 6c 6f 6e 67 20 66 | zero. | long f|
|00002aa0| 72 61 6d 65 73 44 65 73 | 69 72 65 64 3b 0d 20 20 |ramesDes|ired;. |
|00002ab0| 20 20 54 69 6d 65 72 20 | 2a 66 72 61 6d 65 54 69 | Timer |*frameTi|
|00002ac0| 6d 65 72 3b 09 09 09 09 | 09 2f 2f 20 74 69 6d 65 |mer;....|.// time|
|00002ad0| 20 6d 73 20 73 69 6e 63 | 65 20 6c 61 73 74 20 56 | ms sinc|e last V|
|00002ae0| 42 4c 20 69 6e 74 65 72 | 72 75 70 74 2c 20 73 65 |BL inter|rupt, se|
|00002af0| 65 20 54 69 6d 65 72 2e | 63 0d 20 20 20 20 76 6f |e Timer.|c. vo|
|00002b00| 69 64 20 2a 70 74 72 3b | 09 09 09 09 09 09 09 2f |id *ptr;|......./|
|00002b10| 2f 20 75 73 65 20 74 68 | 69 73 20 66 6f 72 20 77 |/ use th|is for w|
|00002b20| 68 61 74 65 76 65 72 20 | 79 6f 75 20 77 61 6e 74 |hatever |you want|
|00002b30| 0d 7d 3b 0d 74 79 70 65 | 64 65 66 20 73 74 72 75 |.};.type|def stru|
|00002b40| 63 74 20 56 42 4c 54 61 | 73 6b 41 6e 64 41 35 20 |ct VBLTa|skAndA5 |
|00002b50| 56 42 4c 54 61 73 6b 41 | 6e 64 41 35 3b 0d 2a 2f |VBLTaskA|ndA5;.*/|
|00002b60| 0d 23 64 65 66 69 6e 65 | 20 54 41 53 4b 5f 53 49 |.#define| TASK_SI|
|00002b70| 5a 45 20 31 30 30 30 09 | 2f 2f 20 47 65 6e 65 72 |ZE 1000.|// Gener|
|00002b80| 6f 75 73 20 67 75 65 73 | 73 20 66 6f 72 20 73 69 |ous gues|s for si|
|00002b90| 7a 65 20 6f 66 20 72 6f | 75 74 69 6e 65 0d 73 74 |ze of ro|utine.st|
|00002ba0| 61 74 69 63 20 6c 6f 6e | 67 20 76 6d 50 72 65 73 |atic lon|g vmPres|
|00002bb0| 65 6e 74 3d 30 3b 0d 73 | 74 61 74 69 63 20 56 42 |ent=0;.s|tatic VB|
|00002bc0| 4c 55 50 50 20 76 62 6c | 50 72 6f 63 50 74 72 2c |LUPP vbl|ProcPtr,|
|00002bd0| 66 72 61 6d 65 53 75 62 | 72 6f 75 74 69 6e 65 50 |frameSub|routineP|
|00002be0| 72 6f 63 50 74 72 2c 73 | 69 6d 70 6c 65 56 42 4c |rocPtr,s|impleVBL|
|00002bf0| 53 75 62 72 6f 75 74 69 | 6e 65 50 72 6f 63 50 74 |Subrouti|neProcPt|
|00002c00| 72 3b 0d 0d 4f 53 45 72 | 72 20 56 42 4c 49 6e 73 |r;..OSEr|r VBLIns|
|00002c10| 74 61 6c 6c 28 56 42 4c | 54 61 73 6b 41 6e 64 41 |tall(VBL|TaskAndA|
|00002c20| 35 20 2a 76 62 6c 44 61 | 74 61 2c 47 44 48 61 6e |5 *vblDa|ta,GDHan|
|00002c30| 64 6c 65 20 64 65 76 69 | 63 65 2c 6c 6f 6e 67 20 |dle devi|ce,long |
|00002c40| 66 72 61 6d 65 73 29 0d | 2f 2f 20 74 72 69 76 69 |frames).|// trivi|
|00002c50| 61 6c 2c 20 62 75 74 20 | 76 65 72 62 6f 73 65 0d |al, but |verbose.|
|00002c60| 7b 0d 09 73 74 61 74 69 | 63 20 69 6e 74 20 66 69 |{..stati|c int fi|
|00002c70| 72 73 74 54 69 6d 65 3d | 31 2c 73 6c 6f 74 52 6f |rstTime=|1,slotRo|
|00002c80| 75 74 69 6e 65 73 41 76 | 61 69 6c 61 62 6c 65 3b |utinesAv|ailable;|
|00002c90| 0d 09 73 74 61 74 69 63 | 20 6c 6f 6e 67 20 74 69 |..static| long ti|
|00002ca0| 6d 65 4d 61 6e 61 67 65 | 72 56 65 72 73 69 6f 6e |meManage|rVersion|
|00002cb0| 3d 30 3b 0d 09 0d 09 69 | 66 28 66 69 72 73 74 54 |=0;....i|f(firstT|
|00002cc0| 69 6d 65 29 7b 0d 09 09 | 66 69 72 73 74 54 69 6d |ime){...|firstTim|
|00002cd0| 65 3d 30 3b 0d 09 09 73 | 6c 6f 74 52 6f 75 74 69 |e=0;...s|lotRouti|
|00002ce0| 6e 65 73 41 76 61 69 6c | 61 62 6c 65 3d 54 72 61 |nesAvail|able=Tra|
|00002cf0| 70 41 76 61 69 6c 61 62 | 6c 65 28 5f 53 6c 6f 74 |pAvailab|le(_Slot|
|00002d00| 56 49 6e 73 74 61 6c 6c | 29 3b 0d 09 09 47 65 73 |VInstall|);...Ges|
|00002d10| 74 61 6c 74 28 67 65 73 | 74 61 6c 74 56 4d 41 74 |talt(ges|taltVMAt|
|00002d20| 74 72 2c 26 76 6d 50 72 | 65 73 65 6e 74 29 3b 0d |tr,&vmPr|esent);.|
|00002d30| 09 09 76 6d 50 72 65 73 | 65 6e 74 20 26 3d 20 67 |..vmPres|ent &= g|
|00002d40| 65 73 74 61 6c 74 56 4d | 50 72 65 73 65 6e 74 3b |estaltVM|Present;|
|00002d50| 0d 09 09 69 66 28 21 4d | 41 54 4c 41 42 29 7b 0d |...if(!M|ATLAB){.|
|00002d60| 09 09 09 23 69 66 20 5f | 5f 4d 57 45 52 4b 53 5f |...#if _|_MWERKS_|
|00002d70| 5f 0d 09 09 09 09 2f 2f | 20 49 6e 20 43 57 34 2e |_.....//| In CW4.|
|00002d80| 35 20 5f 61 74 65 78 69 | 74 28 29 20 6f 6e 6c 79 |5 _atexi|t() only|
|00002d90| 20 67 65 74 73 20 63 61 | 6c 6c 65 64 20 69 66 20 | gets ca|lled if |
|00002da0| 79 6f 75 20 71 75 69 74 | 20 76 69 61 20 61 62 6f |you quit| via abo|
|00002db0| 72 74 28 29 20 6f 72 20 | 65 78 69 74 28 29 2e 0d |rt() or |exit()..|
|00002dc0| 09 09 09 09 50 61 74 63 | 68 45 78 69 74 54 6f 53 |....Patc|hExitToS|
|00002dd0| 68 65 6c 6c 28 29 3b 0d | 09 09 09 23 65 6c 73 65 |hell();.|...#else|
|00002de0| 0d 09 09 09 09 5f 61 74 | 65 78 69 74 28 56 42 4c |....._at|exit(VBL|
|00002df0| 52 65 6d 6f 76 65 41 6c | 6c 29 3b 0d 09 09 09 23 |RemoveAl|l);....#|
|00002e00| 65 6e 64 69 66 0d 09 09 | 7d 0d 09 09 47 65 73 74 |endif...|}...Gest|
|00002e10| 61 6c 74 28 67 65 73 74 | 61 6c 74 54 69 6d 65 4d |alt(gest|altTimeM|
|00002e20| 67 72 56 65 72 73 69 6f | 6e 2c 26 74 69 6d 65 4d |grVersio|n,&timeM|
|00002e30| 61 6e 61 67 65 72 56 65 | 72 73 69 6f 6e 29 3b 0d |anagerVe|rsion);.|
|00002e40| 09 09 76 62 6c 50 72 6f | 63 50 74 72 3d 4e 65 77 |..vblPro|cPtr=New|
|00002e50| 56 42 4c 50 72 6f 63 28 | 56 42 4c 49 6e 74 65 72 |VBLProc(|VBLInter|
|00002e60| 72 75 70 74 53 65 72 76 | 69 63 65 52 6f 75 74 69 |ruptServ|iceRouti|
|00002e70| 6e 65 29 3b 0d 09 09 66 | 72 61 6d 65 53 75 62 72 |ne);...f|rameSubr|
|00002e80| 6f 75 74 69 6e 65 50 72 | 6f 63 50 74 72 3d 4e 65 |outinePr|ocPtr=Ne|
|00002e90| 77 56 42 4c 50 72 6f 63 | 28 46 72 61 6d 65 53 75 |wVBLProc|(FrameSu|
|00002ea0| 62 72 6f 75 74 69 6e 65 | 29 3b 0d 09 09 73 69 6d |broutine|);...sim|
|00002eb0| 70 6c 65 56 42 4c 53 75 | 62 72 6f 75 74 69 6e 65 |pleVBLSu|broutine|
|00002ec0| 50 72 6f 63 50 74 72 3d | 4e 65 77 56 42 4c 50 72 |ProcPtr=|NewVBLPr|
|00002ed0| 6f 63 28 53 69 6d 70 6c | 65 56 42 4c 53 75 62 72 |oc(Simpl|eVBLSubr|
|00002ee0| 6f 75 74 69 6e 65 29 3b | 0d 09 7d 0d 09 76 62 6c |outine);|..}..vbl|
|00002ef0| 44 61 74 61 2d 3e 64 65 | 76 69 63 65 3d 64 65 76 |Data->de|vice=dev|
|00002f00| 69 63 65 3b 0d 09 69 66 | 28 64 65 76 69 63 65 21 |ice;..if|(device!|
|00002f10| 3d 4e 55 4c 4c 20 26 26 | 20 28 2a 64 65 76 69 63 |=NULL &&| (*devic|
|00002f20| 65 29 2d 3e 67 64 52 65 | 66 4e 75 6d 21 3d 30 20 |e)->gdRe|fNum!=0 |
|00002f30| 26 26 20 73 6c 6f 74 52 | 6f 75 74 69 6e 65 73 41 |&& slotR|outinesA|
|00002f40| 76 61 69 6c 61 62 6c 65 | 29 0d 09 09 76 62 6c 44 |vailable|)...vblD|
|00002f50| 61 74 61 2d 3e 73 6c 6f | 74 3d 47 65 74 44 65 76 |ata->slo|t=GetDev|
|00002f60| 69 63 65 53 6c 6f 74 28 | 64 65 76 69 63 65 29 3b |iceSlot(|device);|
|00002f70| 0d 09 65 6c 73 65 20 76 | 62 6c 44 61 74 61 2d 3e |..else v|blData->|
|00002f80| 73 6c 6f 74 3d 2d 31 3b | 0d 09 76 62 6c 44 61 74 |slot=-1;|..vblDat|
|00002f90| 61 2d 3e 76 62 6c 2e 76 | 62 6c 41 64 64 72 3d 28 |a->vbl.v|blAddr=(|
|00002fa0| 76 6f 69 64 20 2a 29 76 | 62 6c 50 72 6f 63 50 74 |void *)v|blProcPt|
|00002fb0| 72 3b 0d 09 76 62 6c 44 | 61 74 61 2d 3e 76 62 6c |r;..vblD|ata->vbl|
|00002fc0| 2e 71 54 79 70 65 3d 76 | 54 79 70 65 3b 0d 09 76 |.qType=v|Type;..v|
|00002fd0| 62 6c 44 61 74 61 2d 3e | 76 62 6c 2e 76 62 6c 43 |blData->|vbl.vblC|
|00002fe0| 6f 75 6e 74 3d 30 3b 09 | 2f 2a 20 49 6e 69 74 69 |ount=0;.|/* Initi|
|00002ff0| 61 6c 6c 79 20 64 69 73 | 61 62 6c 65 20 74 68 65 |ally dis|able the|
|00003000| 20 69 6e 74 65 72 72 75 | 70 74 20 73 65 72 76 69 | interru|pt servi|
|00003010| 63 65 20 72 6f 75 74 69 | 6e 65 20 2a 2f 0d 09 76 |ce routi|ne */..v|
|00003020| 62 6c 44 61 74 61 2d 3e | 76 62 6c 2e 76 62 6c 50 |blData->|vbl.vblP|
|00003030| 68 61 73 65 3d 30 3b 0d | 09 76 62 6c 44 61 74 61 |hase=0;.|.vblData|
|00003040| 2d 3e 6f 75 72 41 35 3d | 53 65 74 43 75 72 72 65 |->ourA5=|SetCurre|
|00003050| 6e 74 41 35 28 29 3b 0d | 09 69 66 28 76 62 6c 44 |ntA5();.|.if(vblD|
|00003060| 61 74 61 2d 3e 73 75 62 | 72 6f 75 74 69 6e 65 3d |ata->sub|routine=|
|00003070| 3d 4e 55 4c 4c 29 7b 0d | 09 09 69 66 28 74 69 6d |=NULL){.|..if(tim|
|00003080| 65 4d 61 6e 61 67 65 72 | 56 65 72 73 69 6f 6e 3e |eManager|Version>|
|00003090| 3d 67 65 73 74 61 6c 74 | 52 65 76 69 73 65 64 54 |=gestalt|RevisedT|
|000030a0| 69 6d 65 4d 67 72 29 7b | 0d 09 09 09 76 62 6c 44 |imeMgr){|....vblD|
|000030b0| 61 74 61 2d 3e 66 72 61 | 6d 65 54 69 6d 65 72 3d |ata->fra|meTimer=|
|000030c0| 4e 65 77 54 69 6d 65 72 | 28 29 3b 0d 09 09 09 53 |NewTimer|();....S|
|000030d0| 74 61 72 74 54 69 6d 65 | 72 28 76 62 6c 44 61 74 |tartTime|r(vblDat|
|000030e0| 61 2d 3e 66 72 61 6d 65 | 54 69 6d 65 72 29 3b 0d |a->frame|Timer);.|
|000030f0| 09 09 09 76 62 6c 44 61 | 74 61 2d 3e 73 75 62 72 |...vblDa|ta->subr|
|00003100| 6f 75 74 69 6e 65 3d 28 | 76 6f 69 64 20 2a 29 66 |outine=(|void *)f|
|00003110| 72 61 6d 65 53 75 62 72 | 6f 75 74 69 6e 65 50 72 |rameSubr|outinePr|
|00003120| 6f 63 50 74 72 3b 0d 09 | 09 7d 0d 09 09 65 6c 73 |ocPtr;..|.}...els|
|00003130| 65 20 76 62 6c 44 61 74 | 61 2d 3e 73 75 62 72 6f |e vblDat|a->subro|
|00003140| 75 74 69 6e 65 3d 28 76 | 6f 69 64 20 2a 29 73 69 |utine=(v|oid *)si|
|00003150| 6d 70 6c 65 56 42 4c 53 | 75 62 72 6f 75 74 69 6e |mpleVBLS|ubroutin|
|00003160| 65 50 72 6f 63 50 74 72 | 3b 0d 09 7d 0d 09 76 62 |eProcPtr|;..}..vb|
|00003170| 6c 44 61 74 61 2d 3e 6e | 65 77 46 72 61 6d 65 3d |lData->n|ewFrame=|
|00003180| 30 3b 0d 09 76 62 6c 44 | 61 74 61 2d 3e 66 72 61 |0;..vblD|ata->fra|
|00003190| 6d 65 3d 30 3b 0d 09 76 | 62 6c 44 61 74 61 2d 3e |me=0;..v|blData->|
|000031a0| 66 72 61 6d 65 73 4c 65 | 66 74 3d 76 62 6c 44 61 |framesLe|ft=vblDa|
|000031b0| 74 61 2d 3e 66 72 61 6d | 65 73 44 65 73 69 72 65 |ta->fram|esDesire|
|000031c0| 64 3d 66 72 61 6d 65 73 | 3b 0d 09 69 66 28 76 6d |d=frames|;..if(vm|
|000031d0| 50 72 65 73 65 6e 74 29 | 7b 0d 09 09 48 6f 6c 64 |Present)|{...Hold|
|000031e0| 4d 65 6d 6f 72 79 28 76 | 62 6c 44 61 74 61 2c 73 |Memory(v|blData,s|
|000031f0| 69 7a 65 6f 66 28 2a 76 | 62 6c 44 61 74 61 29 29 |izeof(*v|blData))|
|00003200| 3b 0d 09 09 48 6f 6c 64 | 4d 65 6d 6f 72 79 28 76 |;...Hold|Memory(v|
|00003210| 62 6c 44 61 74 61 2d 3e | 76 62 6c 2e 76 62 6c 41 |blData->|vbl.vblA|
|00003220| 64 64 72 2c 54 41 53 4b | 5f 53 49 5a 45 29 3b 0d |ddr,TASK|_SIZE);.|
|00003230| 09 09 48 6f 6c 64 4d 65 | 6d 6f 72 79 28 76 62 6c |..HoldMe|mory(vbl|
|00003240| 44 61 74 61 2d 3e 73 75 | 62 72 6f 75 74 69 6e 65 |Data->su|broutine|
|00003250| 2c 54 41 53 4b 5f 53 49 | 5a 45 29 3b 0d 09 7d 0d |,TASK_SI|ZE);..}.|
|00003260| 09 69 66 28 76 62 6c 44 | 61 74 61 2d 3e 73 6c 6f |.if(vblD|ata->slo|
|00003270| 74 3e 3d 30 29 72 65 74 | 75 72 6e 20 53 6c 6f 74 |t>=0)ret|urn Slot|
|00003280| 56 49 6e 73 74 61 6c 6c | 28 28 51 45 6c 65 6d 50 |VInstall|((QElemP|
|00003290| 74 72 29 76 62 6c 44 61 | 74 61 2c 76 62 6c 44 61 |tr)vblDa|ta,vblDa|
|000032a0| 74 61 2d 3e 73 6c 6f 74 | 29 3b 0d 09 65 6c 73 65 |ta->slot|);..else|
|000032b0| 20 72 65 74 75 72 6e 20 | 56 49 6e 73 74 61 6c 6c | return |VInstall|
|000032c0| 28 28 51 45 6c 65 6d 50 | 74 72 29 76 62 6c 44 61 |((QElemP|tr)vblDa|
|000032d0| 74 61 29 3b 0d 7d 0d 0d | 4f 53 45 72 72 20 56 42 |ta);.}..|OSErr VB|
|000032e0| 4c 52 65 6d 6f 76 65 28 | 56 42 4c 54 61 73 6b 41 |LRemove(|VBLTaskA|
|000032f0| 6e 64 41 35 20 2a 76 62 | 6c 44 61 74 61 29 0d 7b |ndA5 *vb|lData).{|
|00003300| 0d 20 20 20 20 69 6e 74 | 20 65 72 72 6f 72 3b 0d |. int| error;.|
|00003310| 0d 09 2f 2f 20 6f 6e 6c | 79 20 72 65 6d 6f 76 65 |..// onl|y remove|
|00003320| 20 69 74 20 69 66 20 77 | 65 20 69 6e 73 74 61 6c | it if w|e instal|
|00003330| 6c 65 64 20 69 74 0d 09 | 69 66 28 76 62 6c 44 61 |led it..|if(vblDa|
|00003340| 74 61 2d 3e 76 62 6c 2e | 76 62 6c 41 64 64 72 20 |ta->vbl.|vblAddr |
|00003350| 21 3d 20 76 62 6c 50 72 | 6f 63 50 74 72 29 72 65 |!= vblPr|ocPtr)re|
|00003360| 74 75 72 6e 20 30 3b 0d | 09 69 66 28 76 62 6c 44 |turn 0;.|.if(vblD|
|00003370| 61 74 61 2d 3e 73 6c 6f | 74 3e 3d 30 29 65 72 72 |ata->slo|t>=0)err|
|00003380| 6f 72 3d 53 6c 6f 74 56 | 52 65 6d 6f 76 65 28 28 |or=SlotV|Remove((|
|00003390| 51 45 6c 65 6d 50 74 72 | 29 76 62 6c 44 61 74 61 |QElemPtr|)vblData|
|000033a0| 2c 76 62 6c 44 61 74 61 | 2d 3e 73 6c 6f 74 29 3b |,vblData|->slot);|
|000033b0| 0d 09 65 6c 73 65 20 65 | 72 72 6f 72 3d 56 52 65 |..else e|rror=VRe|
|000033c0| 6d 6f 76 65 28 28 51 45 | 6c 65 6d 50 74 72 29 76 |move((QE|lemPtr)v|
|000033d0| 62 6c 44 61 74 61 29 3b | 0d 09 69 66 28 76 6d 50 |blData);|..if(vmP|
|000033e0| 72 65 73 65 6e 74 29 7b | 0d 09 09 55 6e 68 6f 6c |resent){|...Unhol|
|000033f0| 64 4d 65 6d 6f 72 79 28 | 76 62 6c 44 61 74 61 2c |dMemory(|vblData,|
|00003400| 73 69 7a 65 6f 66 28 76 | 62 6c 44 61 74 61 29 29 |sizeof(v|blData))|
|00003410| 3b 0d 09 09 55 6e 68 6f | 6c 64 4d 65 6d 6f 72 79 |;...Unho|ldMemory|
|00003420| 28 76 62 6c 44 61 74 61 | 2d 3e 76 62 6c 2e 76 62 |(vblData|->vbl.vb|
|00003430| 6c 41 64 64 72 2c 54 41 | 53 4b 5f 53 49 5a 45 29 |lAddr,TA|SK_SIZE)|
|00003440| 3b 0d 09 09 55 6e 68 6f | 6c 64 4d 65 6d 6f 72 79 |;...Unho|ldMemory|
|00003450| 28 76 62 6c 44 61 74 61 | 2d 3e 73 75 62 72 6f 75 |(vblData|->subrou|
|00003460| 74 69 6e 65 2c 54 41 53 | 4b 5f 53 49 5a 45 29 3b |tine,TAS|K_SIZE);|
|00003470| 0d 09 7d 0d 09 69 66 28 | 76 62 6c 44 61 74 61 2d |..}..if(|vblData-|
|00003480| 3e 73 75 62 72 6f 75 74 | 69 6e 65 3d 3d 28 76 6f |>subrout|ine==(vo|
|00003490| 69 64 20 2a 29 66 72 61 | 6d 65 53 75 62 72 6f 75 |id *)fra|meSubrou|
|000034a0| 74 69 6e 65 50 72 6f 63 | 50 74 72 20 26 26 20 76 |tineProc|Ptr && v|
|000034b0| 62 6c 44 61 74 61 2d 3e | 66 72 61 6d 65 54 69 6d |blData->|frameTim|
|000034c0| 65 72 21 3d 4e 55 4c 4c | 29 0d 09 09 44 69 73 70 |er!=NULL|)...Disp|
|000034d0| 6f 73 65 54 69 6d 65 72 | 28 76 62 6c 44 61 74 61 |oseTimer|(vblData|
|000034e0| 2d 3e 66 72 61 6d 65 54 | 69 6d 65 72 29 3b 0d 09 |->frameT|imer);..|
|000034f0| 72 65 74 75 72 6e 20 65 | 72 72 6f 72 3b 0d 7d 0d |return e|rror;.}.|
|00003500| 0d 76 6f 69 64 20 56 42 | 4c 52 65 6d 6f 76 65 41 |.void VB|LRemoveA|
|00003510| 6c 6c 28 76 6f 69 64 29 | 0d 7b 0d 09 51 48 64 72 |ll(void)|.{..QHdr|
|00003520| 50 74 72 20 71 48 65 61 | 64 65 72 3b 0d 09 51 45 |Ptr qHea|der;..QE|
|00003530| 6c 65 6d 50 74 72 20 71 | 3b 0d 09 0d 09 71 48 65 |lemPtr q|;....qHe|
|00003540| 61 64 65 72 3d 47 65 74 | 56 42 4c 51 48 64 72 28 |ader=Get|VBLQHdr(|
|00003550| 29 3b 0d 09 71 3d 71 48 | 65 61 64 65 72 2d 3e 71 |);..q=qH|eader->q|
|00003560| 48 65 61 64 3b 0d 09 77 | 68 69 6c 65 28 71 21 3d |Head;..w|hile(q!=|
|00003570| 4e 55 4c 4c 29 7b 0d 09 | 09 56 42 4c 52 65 6d 6f |NULL){..|.VBLRemo|
|00003580| 76 65 28 28 56 42 4c 54 | 61 73 6b 41 6e 64 41 35 |ve((VBLT|askAndA5|
|00003590| 20 2a 29 71 29 3b 09 2f | 2f 20 6f 6e 6c 79 20 72 | *)q);./|/ only r|
|000035a0| 65 6d 6f 76 65 73 20 6f | 75 72 73 0d 09 09 71 3d |emoves o|urs...q=|
|000035b0| 71 2d 3e 71 4c 69 6e 6b | 3b 0d 09 7d 0d 7d 09 0d |q->qLink|;..}.}..|
|000035c0| 0d 23 69 66 20 28 54 48 | 49 4e 4b 5f 43 20 7c 7c |.#if (TH|INK_C |||
|000035d0| 20 54 48 49 4e 4b 5f 43 | 50 4c 55 53 29 0d 09 23 | THINK_C|PLUS)..#|
|000035e0| 70 72 61 67 6d 61 20 6f | 70 74 69 6f 6e 73 28 21 |pragma o|ptions(!|
|000035f0| 70 72 6f 66 69 6c 65 29 | 09 2f 2f 20 69 74 20 77 |profile)|.// it w|
|00003600| 6f 75 6c 64 20 62 65 20 | 64 61 6e 67 65 72 6f 75 |ould be |dangerou|
|00003610| 73 20 74 6f 20 63 61 6c | 6c 20 74 68 65 20 70 72 |s to cal|l the pr|
|00003620| 6f 66 69 6c 65 72 20 66 | 72 6f 6d 20 68 65 72 65 |ofiler f|rom here|
|00003630| 0d 09 23 70 72 61 67 6d | 61 20 6f 70 74 69 6f 6e |..#pragm|a option|
|00003640| 73 28 61 73 73 69 67 6e | 5f 72 65 67 69 73 74 65 |s(assign|_registe|
|00003650| 72 73 2c 72 65 64 75 6e | 64 61 6e 74 5f 6c 6f 61 |rs,redun|dant_loa|
|00003660| 64 73 29 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 20 |ds).#end|if..#if |
|00003670| 5f 5f 70 6f 77 65 72 63 | 0d 09 76 6f 69 64 20 56 |__powerc|..void V|
|00003680| 42 4c 49 6e 74 65 72 72 | 75 70 74 53 65 72 76 69 |BLInterr|uptServi|
|00003690| 63 65 52 6f 75 74 69 6e | 65 28 72 65 67 69 73 74 |ceRoutin|e(regist|
|000036a0| 65 72 20 56 42 4c 54 61 | 73 6b 41 6e 64 41 35 20 |er VBLTa|skAndA5 |
|000036b0| 2a 76 62 6c 44 61 74 61 | 29 0d 09 7b 0d 09 09 43 |*vblData|)..{...C|
|000036c0| 61 6c 6c 56 42 4c 50 72 | 6f 63 28 76 62 6c 44 61 |allVBLPr|oc(vblDa|
|000036d0| 74 61 2d 3e 73 75 62 72 | 6f 75 74 69 6e 65 2c 76 |ta->subr|outine,v|
|000036e0| 62 6c 44 61 74 61 29 3b | 09 2f 2f 20 63 61 6c 6c |blData);|.// call|
|000036f0| 20 75 73 65 72 27 73 20 | 74 61 73 6b 2c 20 70 61 | user's |task, pa|
|00003700| 73 73 20 64 61 74 61 20 | 70 74 72 0d 09 7d 0d 23 |ss data |ptr..}.#|
|00003710| 65 6c 73 65 0d 09 23 70 | 72 61 67 6d 61 20 70 61 |else..#p|ragma pa|
|00003720| 72 61 6d 65 74 65 72 20 | 5f 5f 44 30 20 47 65 74 |rameter |__D0 Get|
|00003730| 41 30 0d 09 6c 6f 6e 67 | 20 47 65 74 41 30 28 76 |A0..long| GetA0(v|
|00003740| 6f 69 64 29 3d 30 78 32 | 30 30 38 3b 09 09 2f 2a |oid)=0x2|008;../*|
|00003750| 20 4d 4f 56 45 2e 4c 20 | 41 30 2c 44 30 20 2a 2f | MOVE.L |A0,D0 */|
|00003760| 0d 2f 2f 09 50 74 72 20 | 47 65 74 41 30 28 76 6f |.//.Ptr |GetA0(vo|
|00003770| 69 64 29 3a 5f 5f 44 30 | 20 3d 30 78 32 30 30 38 |id):__D0| =0x2008|
|00003780| 3b 09 2f 2a 20 4d 4f 56 | 45 2e 4c 20 41 30 2c 44 |;./* MOV|E.L A0,D|
|00003790| 30 20 2a 2f 0d 0d 09 76 | 6f 69 64 20 56 42 4c 49 |0 */...v|oid VBLI|
|000037a0| 6e 74 65 72 72 75 70 74 | 53 65 72 76 69 63 65 52 |nterrupt|ServiceR|
|000037b0| 6f 75 74 69 6e 65 28 76 | 6f 69 64 29 0d 09 7b 0d |outine(v|oid)..{.|
|000037c0| 09 09 72 65 67 69 73 74 | 65 72 20 6c 6f 6e 67 20 |..regist|er long |
|000037d0| 6f 6c 64 41 35 3b 0d 09 | 09 72 65 67 69 73 74 65 |oldA5;..|.registe|
|000037e0| 72 20 56 42 4c 54 61 73 | 6b 41 6e 64 41 35 20 2a |r VBLTas|kAndA5 *|
|000037f0| 76 62 6c 44 61 74 61 3b | 0d 09 0d 09 09 76 62 6c |vblData;|.....vbl|
|00003800| 44 61 74 61 20 3d 20 28 | 56 42 4c 54 61 73 6b 41 |Data = (|VBLTaskA|
|00003810| 6e 64 41 35 20 2a 29 47 | 65 74 41 30 28 29 3b 0d |ndA5 *)G|etA0();.|
|00003820| 09 09 6f 6c 64 41 35 20 | 3d 20 53 65 74 41 35 28 |..oldA5 |= SetA5(|
|00003830| 76 62 6c 44 61 74 61 2d | 3e 6f 75 72 41 35 29 3b |vblData-|>ourA5);|
|00003840| 0d 09 09 2f 2f 20 63 61 | 6c 6c 20 75 73 65 72 27 |...// ca|ll user'|
|00003850| 73 20 74 61 73 6b 2c 20 | 70 61 73 73 20 64 61 74 |s task, |pass dat|
|00003860| 61 20 70 74 72 0d 09 09 | 23 69 66 20 47 45 4e 45 |a ptr...|#if GENE|
|00003870| 52 41 54 49 4e 47 43 46 | 4d 0d 2f 2f 20 57 41 52 |RATINGCF|M.// WAR|
|00003880| 4e 49 4e 47 3a 20 75 70 | 70 56 42 4c 50 72 6f 63 |NING: up|pVBLProc|
|00003890| 49 6e 66 6f 20 69 73 20 | 74 68 65 20 77 72 6f 6e |Info is |the wron|
|000038a0| 67 20 73 65 6c 65 63 74 | 6f 72 2e 0d 09 09 09 43 |g select|or.....C|
|000038b0| 61 6c 6c 55 6e 69 76 65 | 72 73 61 6c 50 72 6f 63 |allUnive|rsalProc|
|000038c0| 28 76 62 6c 44 61 74 61 | 2d 3e 73 75 62 72 6f 75 |(vblData|->subrou|
|000038d0| 74 69 6e 65 2c 75 70 70 | 56 42 4c 50 72 6f 63 49 |tine,upp|VBLProcI|
|000038e0| 6e 66 6f 2c 76 62 6c 44 | 61 74 61 29 3b 0d 09 09 |nfo,vblD|ata);...|
|000038f0| 23 65 6c 73 65 0d 09 09 | 09 28 2a 76 62 6c 44 61 |#else...|.(*vblDa|
|00003900| 74 61 2d 3e 73 75 62 72 | 6f 75 74 69 6e 65 29 28 |ta->subr|outine)(|
|00003910| 76 62 6c 44 61 74 61 29 | 3b 0d 09 09 23 65 6e 64 |vblData)|;...#end|
|00003920| 69 66 0d 09 09 53 65 74 | 41 35 28 6f 6c 64 41 35 |if...Set|A5(oldA5|
|00003930| 29 3b 0d 09 7d 0d 23 65 | 6e 64 69 66 0d 0d 76 6f |);..}.#e|ndif..vo|
|00003940| 69 64 20 53 69 6d 70 6c | 65 56 42 4c 53 75 62 72 |id Simpl|eVBLSubr|
|00003950| 6f 75 74 69 6e 65 28 56 | 42 4c 54 61 73 6b 41 6e |outine(V|BLTaskAn|
|00003960| 64 41 35 20 2a 76 62 6c | 44 61 74 61 29 0d 7b 0d |dA5 *vbl|Data).{.|
|00003970| 09 76 62 6c 44 61 74 61 | 2d 3e 6e 65 77 46 72 61 |.vblData|->newFra|
|00003980| 6d 65 3d 31 3b 0d 09 76 | 62 6c 44 61 74 61 2d 3e |me=1;..v|blData->|
|00003990| 66 72 61 6d 65 2b 2b 3b | 0d 09 69 66 28 76 62 6c |frame++;|..if(vbl|
|000039a0| 44 61 74 61 2d 3e 66 72 | 61 6d 65 73 4c 65 66 74 |Data->fr|amesLeft|
|000039b0| 3e 30 29 76 62 6c 44 61 | 74 61 2d 3e 66 72 61 6d |>0)vblDa|ta->fram|
|000039c0| 65 73 4c 65 66 74 2d 2d | 3b 0d 09 69 66 28 76 62 |esLeft--|;..if(vb|
|000039d0| 6c 44 61 74 61 2d 3e 66 | 72 61 6d 65 73 4c 65 66 |lData->f|ramesLef|
|000039e0| 74 21 3d 30 29 76 62 6c | 44 61 74 61 2d 3e 76 62 |t!=0)vbl|Data->vb|
|000039f0| 6c 2e 76 62 6c 43 6f 75 | 6e 74 3d 31 3b 0d 7d 0d |l.vblCou|nt=1;.}.|
|00003a00| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 46 72 61 |.static |void Fra|
|00003a10| 6d 65 53 75 62 72 6f 75 | 74 69 6e 65 28 56 42 4c |meSubrou|tine(VBL|
|00003a20| 54 61 73 6b 41 6e 64 41 | 35 20 2a 76 62 6c 44 61 |TaskAndA|5 *vblDa|
|00003a30| 74 61 29 0d 7b 0d 09 2f | 2f 20 54 68 65 20 31 39 |ta).{../|/ The 19|
|00003a40| 39 31 2d 32 20 41 70 70 | 6c 65 20 76 69 64 65 6f |91-2 App|le video|
|00003a50| 20 63 61 72 64 73 20 65 | 6d 69 74 20 73 65 76 65 | cards e|mit seve|
|00003a60| 72 61 6c 20 76 62 6c 20 | 69 6e 74 65 72 72 75 70 |ral vbl |interrup|
|00003a70| 74 73 20 70 65 72 20 66 | 72 61 6d 65 2c 0d 09 2f |ts per f|rame,../|
|00003a80| 2f 20 77 68 69 63 68 20 | 76 69 6f 6c 61 74 65 73 |/ which |violates|
|00003a90| 20 41 70 70 6c 65 27 73 | 20 64 6f 63 75 6d 65 6e | Apple's| documen|
|00003aa0| 74 61 74 69 6f 6e 2e 0d | 09 2f 2f 20 53 6f 20 77 |tation..|.// So w|
|00003ab0| 65 20 75 73 65 20 74 68 | 65 20 54 69 6d 65 20 4d |e use th|e Time M|
|00003ac0| 61 6e 61 67 65 72 20 74 | 6f 20 69 67 6e 6f 72 65 |anager t|o ignore|
|00003ad0| 20 61 6e 79 20 69 6e 74 | 65 72 72 75 70 74 20 74 | any int|errupt t|
|00003ae0| 68 61 74 20 6f 63 63 75 | 72 73 20 77 69 74 68 69 |hat occu|rs withi|
|00003af0| 6e 20 35 20 6d 73 0d 09 | 2f 2f 20 6f 66 20 74 68 |n 5 ms..|// of th|
|00003b00| 65 20 6d 6f 73 74 20 72 | 65 63 65 6e 74 20 69 6e |e most r|ecent in|
|00003b10| 74 65 72 72 75 70 74 2c | 20 66 6f 72 20 74 68 61 |terrupt,| for tha|
|00003b20| 74 20 76 69 64 65 6f 20 | 64 65 76 69 63 65 2e 0d |t video |device..|
|00003b30| 09 2f 2f 20 54 68 75 73 | 20 74 68 69 73 20 66 72 |.// Thus| this fr|
|00003b40| 61 6d 65 20 63 6f 75 6e | 74 65 72 20 73 68 6f 75 |ame coun|ter shou|
|00003b50| 6c 64 20 77 6f 72 6b 20 | 63 6f 72 72 65 63 74 6c |ld work |correctl|
|00003b60| 79 20 6f 6e 20 61 6c 6c | 20 76 69 64 65 6f 20 63 |y on all| video c|
|00003b70| 61 72 64 73 2e 0d 09 2f | 2f 20 53 75 67 67 65 73 |ards.../|/ Sugges|
|00003b80| 74 65 64 20 62 79 20 52 | 61 79 6e 61 6c 64 20 43 |ted by R|aynald C|
|00003b90| 6f 6d 74 6f 69 73 2e 0d | 09 69 66 28 53 74 6f 70 |omtois..|.if(Stop|
|00003ba0| 54 69 6d 65 72 28 76 62 | 6c 44 61 74 61 2d 3e 66 |Timer(vb|lData->f|
|00003bb0| 72 61 6d 65 54 69 6d 65 | 72 29 3e 35 30 30 30 29 |rameTime|r)>5000)|
|00003bc0| 7b 0d 09 09 76 62 6c 44 | 61 74 61 2d 3e 6e 65 77 |{...vblD|ata->new|
|00003bd0| 46 72 61 6d 65 3d 31 3b | 09 09 09 09 09 09 09 09 |Frame=1;|........|
|00003be0| 09 2f 2f 20 73 65 74 20 | 6e 65 77 2d 66 72 61 6d |.// set |new-fram|
|00003bf0| 65 20 66 6c 61 67 0d 09 | 09 76 62 6c 44 61 74 61 |e flag..|.vblData|
|00003c00| 2d 3e 66 72 61 6d 65 2b | 2b 3b 0d 09 09 69 66 28 |->frame+|+;...if(|
|00003c10| 76 62 6c 44 61 74 61 2d | 3e 66 72 61 6d 65 73 4c |vblData-|>framesL|
|00003c20| 65 66 74 3e 30 29 76 62 | 6c 44 61 74 61 2d 3e 66 |eft>0)vb|lData->f|
|00003c30| 72 61 6d 65 73 4c 65 66 | 74 2d 2d 3b 0d 09 09 69 |ramesLef|t--;...i|
|00003c40| 66 28 76 62 6c 44 61 74 | 61 2d 3e 66 72 61 6d 65 |f(vblDat|a->frame|
|00003c50| 73 4c 65 66 74 21 3d 30 | 29 76 62 6c 44 61 74 61 |sLeft!=0|)vblData|
|00003c60| 2d 3e 76 62 6c 2e 76 62 | 6c 43 6f 75 6e 74 3d 31 |->vbl.vb|lCount=1|
|00003c70| 3b 09 09 2f 2f 20 72 65 | 2d 65 6e 61 62 6c 65 20 |;..// re|-enable |
|00003c80| 69 6e 74 65 72 72 75 70 | 74 0d 09 7d 65 6c 73 65 |interrup|t..}else|
|00003c90| 20 76 62 6c 44 61 74 61 | 2d 3e 76 62 6c 2e 76 62 | vblData|->vbl.vb|
|00003ca0| 6c 43 6f 75 6e 74 3d 31 | 3b 09 09 09 09 09 09 09 |lCount=1|;.......|
|00003cb0| 09 2f 2f 20 72 65 2d 65 | 6e 61 62 6c 65 20 69 6e |.// re-e|nable in|
|00003cc0| 74 65 72 72 75 70 74 0d | 09 53 74 61 72 74 54 69 |terrupt.|.StartTi|
|00003cd0| 6d 65 72 28 76 62 6c 44 | 61 74 61 2d 3e 66 72 61 |mer(vblD|ata->fra|
|00003ce0| 6d 65 54 69 6d 65 72 29 | 3b 0d 7d 0d 0d 2f 2a 0d |meTimer)|;.}../*.|
|00003cf0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |The foll|owing co|
|00003d00| 64 65 2c 20 77 68 69 63 | 68 20 73 65 65 6d 73 20 |de, whic|h seems |
|00003d10| 74 6f 20 77 6f 72 6b 20 | 6f 6e 20 36 38 6b 20 61 |to work |on 68k a|
|00003d20| 6e 64 20 70 70 63 2c 0d | 69 73 20 62 61 73 65 64 |nd ppc,.|is based|
|00003d30| 20 6f 6e 20 65 78 61 6d | 70 6c 65 73 20 74 68 61 | on exam|ples tha|
|00003d40| 74 20 61 70 70 65 61 72 | 65 64 20 69 6e 20 55 73 |t appear|ed in Us|
|00003d50| 65 4e 65 74 20 63 73 6d | 70 2d 64 69 67 65 73 74 |eNet csm|p-digest|
|00003d60| 2d 76 33 2d 30 34 36 0d | 62 79 20 4b 65 76 69 6e |-v3-046.|by Kevin|
|00003d70| 20 42 65 6c 6c 20 28 6b | 62 65 6c 6c 40 63 73 2e | Bell (k|bell@cs.|
|00003d80| 75 74 65 78 61 73 2e 65 | 64 75 29 20 61 6e 64 20 |utexas.e|du) and |
|00003d90| 42 69 6c 6c 20 48 6f 66 | 6d 61 6e 6e 20 28 77 64 |Bill Hof|mann (wd|
|00003da0| 68 40 6e 65 74 63 6f 6d | 2e 63 6f 6d 29 0d 69 6e |h@netcom|.com).in|
|00003db0| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 61 20 71 | respons|e to a q|
|00003dc0| 75 65 72 79 20 62 79 20 | 53 74 65 76 65 20 43 6f |uery by |Steve Co|
|00003dd0| 79 20 28 73 74 65 76 65 | 63 40 6a 6f 6c 74 2e 6d |y (steve|c@jolt.m|
|00003de0| 70 78 2e 63 6f 6d 2e 61 | 75 29 0d 2a 2f 0d 0d 23 |px.com.a|u).*/..#|
|00003df0| 69 66 20 55 4e 49 56 45 | 52 53 41 4c 5f 48 45 41 |if UNIVE|RSAL_HEA|
|00003e00| 44 45 52 53 0d 09 23 69 | 66 20 55 4e 49 56 45 52 |DERS..#i|f UNIVER|
|00003e10| 53 41 4c 5f 48 45 41 44 | 45 52 53 3e 31 0d 09 09 |SAL_HEAD|ERS>1...|
|00003e20| 65 78 74 65 72 6e 20 70 | 61 73 63 61 6c 20 76 6f |extern p|ascal vo|
|00003e30| 69 64 20 45 78 69 74 54 | 6f 53 68 65 6c 6c 28 76 |id ExitT|oShell(v|
|00003e40| 6f 69 64 29 20 4f 4e 45 | 57 4f 52 44 49 4e 4c 49 |oid) ONE|WORDINLI|
|00003e50| 4e 45 28 30 78 41 39 46 | 34 29 3b 0d 09 23 65 6e |NE(0xA9F|4);..#en|
|00003e60| 64 69 66 0d 09 74 79 70 | 65 64 65 66 20 55 6e 69 |dif..typ|edef Uni|
|00003e70| 76 65 72 73 61 6c 50 72 | 6f 63 50 74 72 20 54 72 |versalPr|ocPtr Tr|
|00003e80| 61 70 41 64 64 72 65 73 | 73 54 79 70 65 3b 0d 23 |apAddres|sType;.#|
|00003e90| 65 6c 73 65 0d 09 23 64 | 65 66 69 6e 65 20 55 6e |else..#d|efine Un|
|00003ea0| 69 76 65 72 73 61 6c 50 | 72 6f 63 50 74 72 20 50 |iversalP|rocPtr P|
|00003eb0| 72 6f 63 50 74 72 0d 09 | 23 64 65 66 69 6e 65 20 |rocPtr..|#define |
|00003ec0| 4e 65 77 52 6f 75 74 69 | 6e 65 44 65 73 63 72 69 |NewRouti|neDescri|
|00003ed0| 70 74 6f 72 28 61 2c 62 | 2c 63 29 20 61 0d 09 74 |ptor(a,b|,c) a..t|
|00003ee0| 79 70 65 64 65 66 20 6c | 6f 6e 67 20 54 72 61 70 |ypedef l|ong Trap|
|00003ef0| 41 64 64 72 65 73 73 54 | 79 70 65 3b 0d 23 65 6e |AddressT|ype;.#en|
|00003f00| 64 69 66 0d 73 74 61 74 | 69 63 20 55 6e 69 76 65 |dif.stat|ic Unive|
|00003f10| 72 73 61 6c 50 72 6f 63 | 50 74 72 20 6f 6c 64 45 |rsalProc|Ptr oldE|
|00003f20| 78 69 74 54 6f 53 68 65 | 6c 6c 54 72 61 70 41 64 |xitToShe|llTrapAd|
|00003f30| 64 72 65 73 73 3d 4e 55 | 4c 4c 3b 0d 73 74 61 74 |dress=NU|LL;.stat|
|00003f40| 69 63 20 76 6f 69 64 20 | 50 61 74 63 68 45 78 69 |ic void |PatchExi|
|00003f50| 74 54 6f 53 68 65 6c 6c | 28 76 6f 69 64 29 3b 0d |tToShell|(void);.|
|00003f60| 73 74 61 74 69 63 20 70 | 61 73 63 61 6c 20 76 6f |static p|ascal vo|
|00003f70| 69 64 20 4d 79 45 78 69 | 74 54 6f 53 68 65 6c 6c |id MyExi|tToShell|
|00003f80| 28 76 6f 69 64 29 3b 0d | 23 69 6e 63 6c 75 64 65 |(void);.|#include|
|00003f90| 20 3c 54 72 61 70 73 2e | 68 3e 09 2f 2f 20 5f 45 | <Traps.|h>.// _E|
|00003fa0| 78 69 74 54 6f 53 68 65 | 6c 6c 0d 0d 73 74 61 74 |xitToShe|ll..stat|
|00003fb0| 69 63 20 76 6f 69 64 20 | 50 61 74 63 68 45 78 69 |ic void |PatchExi|
|00003fc0| 74 54 6f 53 68 65 6c 6c | 28 76 6f 69 64 29 0d 7b |tToShell|(void).{|
|00003fd0| 0d 20 20 20 20 55 6e 69 | 76 65 72 73 61 6c 50 72 |. Uni|versalPr|
|00003fe0| 6f 63 50 74 72 20 6d 79 | 45 78 69 74 54 6f 53 68 |ocPtr my|ExitToSh|
|00003ff0| 65 6c 6c 55 50 50 3b 0d | 09 69 66 28 6f 6c 64 45 |ellUPP;.|.if(oldE|
|00004000| 78 69 74 54 6f 53 68 65 | 6c 6c 54 72 61 70 41 64 |xitToShe|llTrapAd|
|00004010| 64 72 65 73 73 3d 3d 4e | 55 4c 4c 29 7b 0d 09 09 |dress==N|ULL){...|
|00004020| 6d 79 45 78 69 74 54 6f | 53 68 65 6c 6c 55 50 50 |myExitTo|ShellUPP|
|00004030| 3d 4e 65 77 52 6f 75 74 | 69 6e 65 44 65 73 63 72 |=NewRout|ineDescr|
|00004040| 69 70 74 6f 72 28 28 50 | 72 6f 63 50 74 72 29 4d |iptor((P|rocPtr)M|
|00004050| 79 45 78 69 74 54 6f 53 | 68 65 6c 6c 2c 6b 50 61 |yExitToS|hell,kPa|
|00004060| 73 63 61 6c 53 74 61 63 | 6b 42 61 73 65 64 2c 47 |scalStac|kBased,G|
|00004070| 65 74 43 75 72 72 65 6e | 74 49 53 41 28 29 29 3b |etCurren|tISA());|
|00004080| 0d 09 20 20 20 20 6f 6c | 64 45 78 69 74 54 6f 53 |.. ol|dExitToS|
|00004090| 68 65 6c 6c 54 72 61 70 | 41 64 64 72 65 73 73 3d |hellTrap|Address=|
|000040a0| 28 55 6e 69 76 65 72 73 | 61 6c 50 72 6f 63 50 74 |(Univers|alProcPt|
|000040b0| 72 29 47 65 74 54 6f 6f | 6c 54 72 61 70 41 64 64 |r)GetToo|lTrapAdd|
|000040c0| 72 65 73 73 28 5f 45 78 | 69 74 54 6f 53 68 65 6c |ress(_Ex|itToShel|
|000040d0| 6c 29 3b 0d 09 20 20 20 | 20 53 65 74 54 6f 6f 6c |l);.. | SetTool|
|000040e0| 54 72 61 70 41 64 64 72 | 65 73 73 28 28 54 72 61 |TrapAddr|ess((Tra|
|000040f0| 70 41 64 64 72 65 73 73 | 54 79 70 65 29 6d 79 45 |pAddress|Type)myE|
|00004100| 78 69 74 54 6f 53 68 65 | 6c 6c 55 50 50 2c 5f 45 |xitToShe|llUPP,_E|
|00004110| 78 69 74 54 6f 53 68 65 | 6c 6c 29 3b 0d 09 7d 0d |xitToShe|ll);..}.|
|00004120| 7d 0d 0d 73 74 61 74 69 | 63 20 70 61 73 63 61 6c |}..stati|c pascal|
|00004130| 20 76 6f 69 64 20 4d 79 | 45 78 69 74 54 6f 53 68 | void My|ExitToSh|
|00004140| 65 6c 6c 28 76 6f 69 64 | 29 0d 7b 0d 09 53 65 74 |ell(void|).{..Set|
|00004150| 43 75 72 72 65 6e 74 41 | 35 28 29 3b 0d 09 53 65 |CurrentA|5();..Se|
|00004160| 74 54 6f 6f 6c 54 72 61 | 70 41 64 64 72 65 73 73 |tToolTra|pAddress|
|00004170| 28 28 54 72 61 70 41 64 | 64 72 65 73 73 54 79 70 |((TrapAd|dressTyp|
|00004180| 65 29 6f 6c 64 45 78 69 | 74 54 6f 53 68 65 6c 6c |e)oldExi|tToShell|
|00004190| 54 72 61 70 41 64 64 72 | 65 73 73 2c 5f 45 78 69 |TrapAddr|ess,_Exi|
|000041a0| 74 54 6f 53 68 65 6c 6c | 29 3b 0d 09 56 42 4c 52 |tToShell|);..VBLR|
|000041b0| 65 6d 6f 76 65 41 6c 6c | 28 29 3b 0d 09 45 78 69 |emoveAll|();..Exi|
|000041c0| 74 54 6f 53 68 65 6c 6c | 28 29 3b 0d 7d 0d 00 00 |tToShell|();.}...|
|000041d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000041f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004200| 00 00 01 00 00 00 02 ce | 00 00 01 ce 00 00 00 86 |........|........|
|00004210| 00 00 02 13 1c 42 4e 6f | 6e 2d 43 6f 6c 6c 65 67 |.....BNo|n-Colleg|
|00004220| 65 20 57 6f 72 6b 20 53 | 74 75 64 79 20 4a 6f 62 |e Work S|tudy Job|
|00004230| 0c 56 42 4c 49 6e 73 74 | 61 6c 6c 2e 63 7c 02 00 |.VBLInst|all.c|..|
|00004240| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00004250| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00004260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004270| 00 00 ab bf ee 73 00 00 | 00 00 00 00 03 54 00 01 |.....s..|.....T..|
|00004280| 00 00 00 00 00 00 00 00 | 48 57 00 00 00 00 00 00 |........|HW......|
|00004290| 00 00 00 00 00 00 00 00 | 0b 00 00 00 02 13 05 42 |........|.......B|
|000042a0| 4e 6f 6e 65 02 00 00 00 | 4d 41 49 4c 43 45 44 41 |None....|MAILCEDA|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 02 3d 00 00 00 00 |........|...=....|
|000042c0| 09 84 00 00 10 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042d0| a3 52 0b f4 a3 52 0b f4 | 00 00 00 00 00 00 00 00 |.R...R..|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 48 55 |........|......HU|
|000042f0| 00 02 00 00 00 00 00 00 | 00 00 48 55 00 00 00 00 |........|..HU....|
|00004300| 00 00 00 88 00 04 00 24 | 00 00 2b 00 00 d2 00 50 |.......$|..+....P|
|00004310| 42 b4 00 00 15 73 6c 6f | 74 52 6f 75 74 69 6e 65 |B....slo|tRoutine|
|00004320| 73 41 76 61 69 6c 61 62 | 6c 65 00 24 00 00 2b 00 |sAvailab|le.$..+.|
|00004330| 00 d2 00 50 42 a4 00 00 | 15 73 6c 6f 74 52 6f 75 |...PB...|.slotRou|
|00004340| 74 69 6e 65 73 41 76 61 | 69 6c 61 62 6c 65 00 28 |tinesAva|ilable.(|
|00004350| 00 00 2f 2c 00 f2 00 50 | 42 94 80 00 00 47 01 4d |../,...P|B....G.M|
|00004360| 01 1c 02 7c 94 20 00 00 | 00 00 00 00 09 2a 76 62 |...|. ..|.....*vb|
|00004370| 6c 44 61 74 61 20 00 16 | 00 00 2f 2c 00 f2 00 50 |lData ..|../,...P|
|00004380| 42 14 00 00 07 76 62 6c | 44 61 74 61 00 00 00 0a |B....vbl|Data....|
|00004390| 00 00 32 d2 01 10 00 00 | 00 00 00 00 00 1e 00 2a |..2.....|.......*|
|000043a0| 00 03 01 d1 01 ff 00 2a | 00 03 01 6b 01 3a 00 00 |.......*|...k.:..|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 ba |........|........|
|000043c0| 00 07 00 00 37 97 00 00 | 37 a6 0f 46 72 61 6d 65 |....7...|7..Frame|
|000043d0| 53 75 62 72 6f 75 74 69 | 6e 65 00 00 36 cd 00 00 |Subrouti|ne..6...|
|000043e0| 36 e0 13 53 69 6d 70 6c | 65 56 42 4c 53 75 62 72 |6..Simpl|eVBLSubr|
|000043f0| 6f 75 74 69 6e 65 00 00 | 2a 35 00 00 2a 3f 0b 56 |outine..|*5..*?.V|
|00004400| 42 4c 49 6e 73 74 61 6c | 6c 00 00 00 35 1d 00 00 |BLInstal|l...5...|
|00004410| 35 37 1b 56 42 4c 49 6e | 74 65 72 72 75 70 74 53 |57.VBLIn|terruptS|
|00004420| 65 72 76 69 63 65 52 6f | 75 74 69 6e 65 00 00 00 |erviceRo|utine...|
|00004430| 34 06 00 00 34 20 1b 56 | 42 4c 49 6e 74 65 72 72 |4...4 .V|BLInterr|
|00004440| 75 70 74 53 65 72 76 69 | 63 65 52 6f 75 74 69 6e |uptServi|ceRoutin|
|00004450| 65 00 00 00 30 74 00 00 | 30 7d 09 56 42 4c 52 65 |e...0t..|0}.VBLRe|
|00004460| 6d 6f 76 65 00 00 32 9e | 00 00 32 aa 0d 56 42 4c |move..2.|..2..VBL|
|00004470| 52 65 6d 6f 76 65 41 6c | 6c 00 00 00 00 48 00 09 |RemoveAl|l....H..|
|00004480| 4d 6f 6e 61 63 6f 00 00 | 00 00 00 00 00 00 00 00 |Monaco..|........|
|00004490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044a0| 00 03 00 04 00 86 00 18 | 01 89 02 77 00 86 00 18 |........|...w....|
|000044b0| 01 89 02 77 ab 9b 31 4f | 00 00 2c e7 00 00 2c f1 |...w..1O|..,...,.|
|000044c0| 00 00 2b e2 00 00 00 00 | 00 04 00 01 00 01 00 00 |..+.....|........|
|000044d0| 01 00 00 00 02 ce 00 00 | 01 ce 00 00 00 86 00 a8 |........|........|
|000044e0| 86 10 26 ee 00 00 00 1c | 00 86 00 03 44 54 56 55 |..&.....|....DTVU|
|000044f0| 00 00 00 22 42 4b 50 54 | 00 00 00 2e 4d 50 53 52 |..."BKPT|....MPSR|
|00004500| 00 02 00 3a 4d 57 42 42 | 00 00 00 5e 4e 26 ff ff |...:MWBB|...^N&..|
|00004510| 00 00 00 00 00 00 00 00 | 5b 2d ff ff 00 00 00 8c |........|[-......|
|00004520| 00 00 00 00 03 f0 ff ff | 00 00 00 9a 00 00 00 00 |........|........|
|00004530| 03 ef ff ff 00 00 00 bc | 00 00 00 00 03 ed ff ff |........|........|
|00004540| 00 00 01 7a 00 00 00 00 | 03 f0 ff ff 00 00 01 c6 |...z....|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+